Use Excel CELL Filename Paths from OneDrive in Power Query
Question details
Use the file location returned by Excel's CELL("filename") function when the workbook is stored in OneDrive and queried with Power Query.

- Product
- Microsoft Excel Power Query with OneDrive
- Device & OS
- not provided
- Scenario
- The workbook is saved in OneDrive, and the user wants Power Query to locate files or folders based on the workbook location.
- Observed behavior
- CELL("filename") can return a cloud address such as https://d.docs.live.net/<user-id>/[Workbook.xlsx]Sheet1 instead of a local Windows folder path.
Open the workbook from the intended OneDrive account and confirm whether OneDrive is syncing its files to your computer. In Excel, check the returned CELL("filename") value before using it as a Power Query source path.
Connect Power Query to the OneDrive or SharePoint cloud location
Use this method when the source files should remain in OneDrive or SharePoint and be refreshed from the cloud.
A d.docs.live.net address is a cloud URL, not a standard Windows folder path. Power Query must use a connector that can authenticate to the OneDrive or SharePoint location instead of treating this value as a local file path.
Avoid embedding a personal user ID or a workbook-specific URL in a query that other people need to use. Configure the query against the shared cloud location whenever possible.
In Excel, select the cell containing CELL("filename") and confirm whether it begins with https://d.docs.live.net/. If it does, do not use it directly in File.Contents as a local path.
Select Data > Get Data and choose the connector appropriate for where the files are stored, such as SharePoint Folder for a SharePoint or business OneDrive library, or another available online source connector for your OneDrive location.
When Excel prompts for credentials, sign in with the Microsoft account that has access to the OneDrive folder, then select the required folder or file in the Navigator.
In the Power Query Editor, filter the folder listing by Folder Path, Name, or file extension, then select Home > Close & Load to load the results.

Use the synchronized OneDrive folder as a local Power Query source
Use this option when OneDrive files are synced on the computer and the query needs a conventional Windows folder path.
Open and Work with Excel Files in WPS Office
If you need a free, lightweight office suite for everyday spreadsheet work, WPS Office provides a familiar spreadsheet interface and seamless migration from Microsoft Office files. You can open, edit, and share Excel workbooks while retaining common worksheet content and formatting.
- 1. Install WPS Office: Download and install WPS Office, then open WPS Spreadsheets from the app launcher.
- 2. Open the Excel workbook: Select Menu > Open and choose the .xlsx or .xls workbook stored on your computer or synced OneDrive folder.
- 3. Review workbook content: Check worksheets, formulas, tables, and formatting in WPS Spreadsheets before making changes.
- 4. Save in an Excel-compatible format: Select Menu > Save As and choose Excel Workbook (*.xlsx) to keep the file compatible with Microsoft Excel users.

Frequently Asked Questions
Why does CELL("filename") return a d.docs.live.net address?
When the workbook is opened from OneDrive, Excel may report its cloud storage URL rather than a local Windows path. The d.docs.live.net address identifies a OneDrive cloud location and is not directly usable as a normal File.Contents path.
Can I use a OneDrive URL directly in Power Query?
Use an authenticated cloud connector rather than treating the URL as a local file path. In Excel, start from Data > Get Data and choose the connector that matches the OneDrive or SharePoint location.
How do I make Power Query use my synced OneDrive folder?
Find the synced folder in File Explorer, copy its local Windows path, and then use Data > Get Data > From File > From Folder in Excel. Confirm the files are available locally before refreshing.
Will a hard-coded OneDrive path work for other users?
Usually not. Cloud URLs can contain a user-specific identifier, and synced local paths commonly contain each user's Windows account name. Use a shared cloud location or a Power Query parameter for values that differ by user.
What should I check when a OneDrive Power Query refresh fails?
Confirm that you are signed in to the correct Microsoft account, have permission to the target folder, and selected the proper connector. For synced folders, also verify that OneDrive has downloaded the required files locally.




