Power Query ; From Folder

dicken

Active Member
Joined
Feb 12, 2022
Messages
292
Office Version
  1. 365
Platform
  1. Windows
Hi
When using From Folder ; I always get both 'sheet' and 'table' but when watching quite a few tutorials this does not seem to be the case,

my usual approach is
From Folder ;
Excel Formula:
Folder.Files("C:\Users\Name \OneDrive\Desktop\New folder\New folder")

Then either trans form of add column

Excel Formula:
Table.TransformColumns(  Source, { "Content", each Excel.Workbook(_) } )

So now for each Table in the content column, I have two rows one for Table and one for sheet;
is there a way to deal with the source excel table / sheets to only bring in one or the other, they both contain the tables I want?

Richard
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I’ve never seen the behaviour that you describe here. Take a look at my article here and it will help you understand how it works. Understanding Power Query Combine

normally what happens is, there are two main queries that are generated, the sample query and the combine query. The sample query should select either table or sheets which is not what you’re describing. Maybe you were doing it manually. So the solution is to make sure that your second query, the file combine query, is pre-filtered so that only a list of either sheets or tables are passed to the function.
 
Upvote 0
Solution
I’ve never seen the behaviour that you describe here. Take a look at my article here and it will help you understand how it works. Understanding Power Query Combine

normally what happens is, there are two main queries that are generated, the sample query and the combine query. The sample query should select either table or sheets which is not what you’re describing. Maybe you were doing it manually. So the solution is to make sure that your second query, the file combine query, is pre-filtered so that only a list of either sheets or tables are passed to the function.


Hi Matt,
I'm not using the combine option, jus as the stage below selecting transform,

View attachment 93826

And then
Excel Formula:
Table.TransformColumns(  Source, { "Content", Excel.Workbook} )
To get the table


View attachment 93828
I’ve never seen the behaviour that you describe here. Take a look at my article here and it will help you understand how it works. Understanding Power Query Combine

normally what happens is, there are two main queries that are generated, the sample query and the combine query. The sample query should select either table or sheets which is not what you’re describing. Maybe you were doing it manually. So the solution is to make sure that your second query, the file combine query, is pre-filtered so that only a list of either sheets or tables are passed to the function.
Hello Matt,
Yes, I know the pane you mean about selecting table, so in your arcticle

When given the option, I select the Combine button (combine and edit).
I'm selecting edit / transform. and then using excel.workbook to get at the binary,

RD
 
Upvote 0

Forum statistics

Threads
1,223,936
Messages
6,175,508
Members
452,650
Latest member
Tinfish

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
Back
Top