Fix Excel OneDrive Hyperlinks Changing to Invalid Relative Paths
Question details
Users are experiencing issues where hyperlinks to other workbooks in Excel for the web automatically format into broken relative paths, resulting in an error when clicked.

- Product
- Excel for the web, OneDrive, SharePoint
- Device & OS
- not provided
- Scenario
- Creating a hyperlink inside an Excel workbook stored in OneDrive or SharePoint that redirects to another online workbook.
- Observed behavior
- The absolute URL pasted into the hyperlink is dynamically rewritten into an invalid relative path that combines the source workbook's location and the target's location, breaking the link.
Before troubleshooting, verify that the target workbook hasn't been moved, deleted, or renamed, and ensure your internet connection is stable.
Test Links Directly and Compare with Excel Desktop
Verify if the issue is strictly isolated to Excel for the web by testing the target URL directly and comparing its behavior with the Excel desktop application.
Excel for the web sometimes attempts to optimize URLs between files in the same cloud environment, which can lead to miscalculated relative paths. Testing in the desktop app bypasses this web-specific behavior.
Copy the hyperlink you want to use, open a new browser tab, and paste the URL directly into the address bar to ensure the target file opens correctly.
Instead of using the web browser, open the source workbook using the Microsoft Excel desktop application.
Insert the absolute URL into the desired cell using the 'Insert Link' feature. Click the link to confirm it routes correctly without auto-resolving into a relative path.

Flush DNS Cache to Resolve Network Conflicts
Clear your computer's DNS cache to resolve any underlying network or connectivity conflicts that might be affecting Office online services.
Contact Microsoft 365 Support with HAR Logs
Since this is often an unexpected service behavior in Excel Online, it requires investigation by Microsoft's development team via HAR (HTTP Archive) logs.
Try WPS Office for Reliable File Linking and Management
If Microsoft Excel's web platform keeps breaking your hyperlinks due to auto-formatting bugs, consider switching to WPS Office. It provides a stable, lightweight desktop experience with highly reliable hyperlink handling, making cross-document referencing hassle-free.
- 1. Download the software: Visit the official WPS Office website and download the free desktop application.
- 2. Install WPS Office: Run the installer and follow the simple on-screen instructions to set up the software on your device.
- 3. Open and edit your files: Open your existing .xlsx files directly in WPS Spreadsheet and manage your hyperlinks reliably.

Frequently Asked Questions
Why do my Excel web links change to relative paths automatically?
Excel for the web sometimes incorrectly tries to optimize URLs between files stored in the same SharePoint or OneDrive environment by converting absolute URLs to relative paths. If the service miscalculates the directory structure, it results in invalid, broken links.
Can I disable relative links in Excel for the web?
Currently, Excel for the web does not offer a direct setting to disable automatic relative hyperlink generation. However, using the Excel Desktop application typically bypasses this cloud-specific auto-formatting behavior.
How do I collect HAR logs for Microsoft Support?
Open your web browser's Developer Tools (usually by pressing F12 or right-clicking and selecting 'Inspect'). Go to the 'Network' tab, ensure the 'Preserve log' option is checked, reproduce the hyperlink error in Excel for the web, and then click the 'Export HAR' (or download) icon to save the log file.




