How to Retrieve a SharePoint List Folder Name in Excel
Question details
The user needs to display the folder name or path of items from a SharePoint Online list after importing the data into Excel.
- Product
- Microsoft Excel / SharePoint Online
- Device & OS
- not provided
- Scenario
- Importing or exporting a SharePoint Online list containing folders into Excel.
- Observed behavior
- Excel does not clearly show the folder name by default, though fields like Path and Encoded Absolute URL are available in the dataset.
Ensure you have the appropriate view and export permissions for the target SharePoint Online list.
Export to Excel and Utilize the Path Column
Use the built-in Export to Excel feature in SharePoint to expose the Path column, which indicates the containing folder for each item.
SharePoint does not inherently expose a simple 'Folder Name' metadata column for list items. Instead, it embeds this information within the item's path.
Navigate to your SharePoint Online list that contains the folders and items.
Click on the 'Export' button located in the top command bar of the list and select 'Export to Excel'.
Open the downloaded query file (usually a .iqy file) in Excel and click 'Enable' when prompted about data connections.
Look for the 'Path' or 'Encoded Absolute URL' column in the generated Excel table to identify the folder path associated with each item.
Extract Folder Name using Excel Formulas
If your exported data only provides the absolute URL or full path, use Excel text formulas to extract just the folder name.
Manage Your Exported Spreadsheet Data with WPS Office
While SharePoint lists are heavily integrated with Microsoft's ecosystem, WPS Office provides a lightweight, highly compatible, and free alternative for analyzing and organizing your exported spreadsheet data.
- 1. Download and Install: Download WPS Office for free from the official website and install it on your device.
- 2. Open Exported File: Launch WPS Spreadsheet and open the .xlsx or .csv data file you retrieved from SharePoint.
- 3. Analyze Data: Utilize WPS Spreadsheet's built-in text formulas to clean the data and extract folder names from the path columns.

Frequently Asked Questions
Why doesn't SharePoint export a simple folder name column?
SharePoint structures its lists and libraries using URLs and item metadata. The folder hierarchy is inherently reflected in the item's 'Path' or 'Encoded Absolute URL' rather than a dedicated, plain-text folder name field.
Can I use Power Query to extract the folder name in Excel?
Yes. By importing the SharePoint list directly via Power Query (Get Data > From Online Services > From SharePoint Online List), you can use the 'Split Column' feature by delimiter (such as a slash) to isolate the folder name before loading the data into your spreadsheet.
Will the folder paths update automatically if I move items in SharePoint?
If you imported the data using a live data connection (like Power Query or a web query file), clicking 'Refresh All' on the Data tab in Excel will update the list to reflect any new folders or moved items in SharePoint.




