The Power Query tool can be used to export .xlsx and .txt file inside a folder and subfolder list to Excel.

Step 1 – Choose a Folder from the Data Tab
- Go to the Data tab and select the From Folder option from the Get Data feature.

- Select the folder to export from local storage and click Open.

Read More: Export Folder Structure to Excel
Step 2 – Import Data to Worksheet
- A preview window will open, click the Load To option.

- Import Data window will pop-up, input the cell location for inserting data and click OK.

Step 3 – Editing Data in Power Query Editor
- Edit the exported data by clicking the Edit option from the Query feature.

- When selecting multiple columns, choose Remove Columns from the Manage Columns option to delete columns.

- You can make a duplicate of the column from the Duplicate Column option by choosing the folder path column.

- Split the column by clicking the By Delimiter option from the Split Column

- In the pop-up window, choose the Custom option from the drop-down list.
- Input a delimiter (\), choose Columns from the Advanced Options, and enter a column number. Depending on the number of columns you need, enter the desired number.
- Click OK.

- The folder and subfolder lists are split.
- Click on Close and Load.

- The folder and subfolder list are successfully exported to Excel.

How to Show Folder and File Lists of a Certain Path in Excel
The Web browser can be used to show folder and file lists for a certain path.

- Open the folder and copy the folder path.

- Open the web browser and paste it in the Address bar and Press the ENTER

- The file lists will be displayed inside your browser.
- Select the lists, press CTRL+C to copy.

- Open your Excel workbook and paste the copied list.

Frequently Asked Questions
- Can I export a folder and subfolder list to Excel on a Mac?
Yes, it is possible to export a folder and subfolder list to Excel on a Mac by using the Terminal application to generate a list of files and folders in the desired directory, and then copying and pasting that list into an Excel worksheet.
- What information can be exported to Excel from a folder and subfolder list?
The information that can be exported to Excel from a folder and subfolder list includes file name, size, date created, date modified, and other relevant information.
Download Practice Workbook
<< Go Back to Power Query Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!

