Importing Data in a Range into Power Query

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
102
Office Version
  1. 365
Platform
  1. Windows
Hi,

I would like to import into Power Query data in worksheet that's not formatted in a Table and I would prefer it to remain like that.

Is it possible to do this?

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
select your range and name it then import into Power Query Editor
 

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
102
Office Version
  1. 365
Platform
  1. Windows
Thank you.

I tried that but I'm still being promoted to create a Table when I use From Table/Range in the Get & Transform Data tab?

Is there another way to do this?
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
Your way is for Table not a named range
for the range you need to open blank query then in Advanced Editor use this M
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="name_of_your_range"]}[Content]
in
    Source
 

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
102
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Excellent, thank you!
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
You are welcome & thanks for the feedback

for future
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499

ADVERTISEMENT

also you can try after save your workbook: New Query - From File - From Workbook then choose your saved file

example
Power Query:
let
    Source = Excel.Workbook(File.Contents("D:\test\nametest.xlsx"), null, true),
    testname_DefinedName = Source{[Item="testname",Kind="DefinedName"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(testname_DefinedName, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Artist", type text}, {"Year", Int64.Type}, {"Month", type text}, {"Sales", type number}})
in
    #"Changed Type"
 

Watch MrExcel Video

Forum statistics

Threads
1,132,686
Messages
5,654,754
Members
418,151
Latest member
shukoor

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top