Import data of sheet in current workbook into Power Query WITHOUT named range

Galven

New member
Joined
Feb 14, 2020
Messages
2
Reaction score
0
Points
0
Excel Version(s)
2016
[FONT=&quot]Hi,[/FONT]
[FONT=&quot]How to import the data of the sheet called "Input" into Power Query without using a named range ?[/FONT]
[FONT=&quot]That sheet is located in the workbook containing the query.[/FONT]
[FONT=&quot]Thanks[/FONT]
 
Just select the worksheet tab when you import the data from the workbook into PQ.
 
Hi Galven,

If the sheet is within the same workbook, the only safe way to pull it in to Power Query is by using a Table or a Named Range.

There are two workarounds to this issue:

1) Set a print area
You could then create a blank query and use the following formula to access the Print Area:
[formula]= Excel.CurrentWorkbook()[/formula]

The trick here is just to make a print area that is bigger than the maximum size your data will ever be.

2) Use "From Excel" and target the file you're in.
DO NOT DO THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING

The challenge with this approach is that the data you pull is the most recent saved version of the file. So if you update something in the worksheet, then refresh, the data will not refresh unless you've saved the workbook first. In addition, if you are trying to connect to all tables in the workbook, it is very easy to create a circular reference that only shows up after you save. It's a nightmare to debug unless you realize what is happening.

Hope that helps,
 
Back
Top