List files in folders AND it's associated column data

Moggy2497

New Member
Joined
Aug 15, 2023
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Newbie here, so please don't bite my head off! 😎

Any help would be very much appreciated.

I am trying to get Excel to return a list of file names and their associated column data but it's proving a tad frustrating, and I'm about to throw said PC out of my window.

Returning the file name isn't a problem - data - new query - from file - from folder. Simple enough really. However, the problem starts when I also need (or want) Excel to not only return the file name, but the other column data too.
Power Query will only bring back the actual file name and the other columns seem to be made up, or pre-selected without the option to change them.

The attached image / file may help you understand what I mean.

Combined.JPG

The top half of the image is a screenshot of Excel Power Query results (with the column headers highlighted in yellow)
and the bottom half is a screenshot of the actual folder contents with it's headers also highlighted in yellow. It's the data within these columns that I also neew Power Query to bring back and not make up it's own.

Firstly, is it possible for me to achieve my goal and secondly, if so, how do I do it?

Any help would be appreciated

Cheers
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Power Query Not Returning Table Data in Files
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
After you've pulled in a Folder with Power Query, if you Expand the Attributes column, you'll probably find what you're looking for. Here's all of the available attributes.
Content TypeKindSizeReadOnlyHiddenSystemDirectoryArchiveDeviceNormalTemporarySparseFileReparsePointCompressedOfflineNotContentIndexedEncryptedChangeTimeSymbolicLinkMountPoint
text/csvCSV File48083FALSEFALSEFALSEFALSETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE08/17/2023 08:16FALSEFALSE
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetExcel File157452FALSEFALSEFALSEFALSETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE06/17/2023 13:52FALSEFALSE
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetExcel File162640FALSEFALSEFALSEFALSETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE06/17/2023 13:52FALSEFALSE
text/plainText File633FALSEFALSEFALSEFALSETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE07/25/2023 06:31FALSEFALSE
Unless you need an attribute that's not there (and there are a LOT), there's no need to use VBA.
 
Upvote 0

Forum statistics

Threads
1,215,088
Messages
6,123,057
Members
449,091
Latest member
ikke

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