How to Fix Excel Hyperlinks to OneDrive Files for External Users
Question details
External users experience 404 errors when clicking Excel hyperlinks that point to images or files hosted on OneDrive.

- Product
- Microsoft Excel / OneDrive
- Device & OS
- not provided
- Scenario
- Sharing an Excel workbook containing hyperlinks to images stored in a shared OneDrive folder with external clients.
- Observed behavior
- Hyperlinks that use relative filenames work for internal users but return a 404 error for external users, as Excel attempts to resolve them to an internal SharePoint/OneDrive path.
Ensure you have the appropriate administrative permissions to generate 'Anyone with the link' sharing URLs for the files in your OneDrive or SharePoint directory.
Replace Relative Filenames with 'Anyone' Shared Links
Manually update your Excel hyperlinks by replacing local filenames with fully accessible cloud URLs to ensure external clients can open the linked files.
When Excel uses a relative reference within a HYPERLINK formula (such as `=HYPERLINK("testimage.jpg")`), it automatically resolves to the internal SharePoint or OneDrive directory structure. External users lack access to this internal structure, which triggers a 404 error. Providing a direct, unrestricted 'Anyone' link bypasses this authentication barrier.
Open your OneDrive folder online, right-click the target file, and select 'Share'.
Adjust the sharing settings to 'Anyone with the link can view' and click 'Apply'.
Click the 'Copy link' button to copy the complete URL to your clipboard.
In your Excel workbook, replace the local filename in your cell with this complete URL so your HYPERLINK formula references the public link.

Bulk Update Links Using Power Automate
For workbooks containing hundreds of image links, use Microsoft Power Automate to extract share links and update the Excel spreadsheet automatically.
Edit and Share Spreadsheets Easily with WPS Office
Looking for a lighter, cost-effective way to manage your spreadsheets? WPS Office provides a highly compatible, free alternative to Microsoft Office. It supports all standard Excel formats, allows seamless hyperlink management, and comes with built-in cloud sharing features that are simple for both internal and external users.
- 1. Download and Install: Download WPS Office from the official website and install it on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx workbook.
- 3. Manage and Share: Easily edit your hyperlinks and use WPS Cloud to generate stable sharing links for external collaborators.

Frequently Asked Questions
Why do relative hyperlinks work for me but not for external users?
Relative hyperlinks rely on the directory structure of the host (like SharePoint or OneDrive). Because you are logged into your organization's environment, Excel successfully finds the file. External users do not have this access, so the internal path returns a 404 error.
Can I use a formula to automatically generate the full OneDrive link?
No, Excel formulas cannot automatically convert a local filename into an 'Anyone' sharing link because the sharing link contains a unique, randomly generated token for security. These links must be generated through OneDrive or Power Automate.
What does a 404 error mean when clicking an Excel hyperlink?
A 404 error means 'File Not Found'. In this context, it indicates that the server cannot locate the file at the specific URL provided, usually because the user lacks the proper permissions or the link is pointing to an internal directory.
Does this issue happen with all cloud storage providers?
This specific resolution behavior is native to the Microsoft Office and OneDrive/SharePoint ecosystem. However, any cloud storage provider will require you to use proper public sharing URLs instead of local relative paths when sharing files with external users.




