Fix Excel Workbook Links Changed to OneDrive Web Paths
Question details
Use local paths for Excel workbook references and queries affected by OneDrive web paths.

- Product
- Microsoft Excel and OneDrive
- Device & OS
- not provided
- Scenario
- Workbooks are stored in OneDrive, and formulas or Power Query need to reference synchronized local files.
- Observed behavior
- Excel may use HTTPS or SharePoint paths for workbook links or return a web path from CELL("filename"), which can disrupt formulas and queries expecting a local path.
Confirm that OneDrive is syncing the folder containing the source workbook. In your file manager, locate the synchronized source file and, if available, select Always keep on this device so it is available offline.
Change the workbook link to the synchronized local file
Use this approach when an external workbook reference points to a OneDrive or SharePoint URL.
Open your synchronized OneDrive folder in your file manager and find the source workbook. Note its local folder path and file name.
In the destination workbook in Excel, select Data > Workbook Links or Data > Edit Links, depending on your Excel version.
Select the affected link, choose Change Source, and browse to the synchronized local copy of the source workbook. Confirm the selection.
Open a cell that references the source workbook and check its formula. Save the destination workbook, reopen it, and verify that the link still works.

Update a Power Query source to use a local path
Use this when a query expects a local file but its source points to a OneDrive or SharePoint URL.
Work with Excel files in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format support for an easier transition. It does not change how Microsoft Excel handles OneDrive paths.

Frequently Asked Questions
Why does CELL("filename") return a SharePoint URL?
When Excel works with a OneDrive or SharePoint workbook, it may identify the file by its online location. CELL("filename") can therefore return a URL instead of the local synchronized path.
Can I stop Excel from using OneDrive URLs for all workbook links?
There is no universal setting that prevents this in every situation. For an individual external link, try Data > Workbook Links or Data > Edit Links and use Change Source to select the local synchronized file.
How can I keep the source workbook available offline?
In your file manager, find the workbook in the synchronized OneDrive folder, right-click it, and choose Always keep on this device if that option is available.
What if Power Query uses a path from CELL("filename")?
A query that expects a local path may fail if the cell returns a URL. Enter the synchronized local path in a separate cell or query parameter, then update the query in Data > Queries & Connections to use that value.




