OneDrive File Issues

Use Relative Hyperlinks in Excel Instead of OneDrive URLs

Chanuka GeekiyanageChanuka Geekiyanage Dec 2, 2026 868 views

Question details

The user wants Excel hyperlinks to nearby files to use relative paths rather than long OneDrive or SharePoint URLs.

Use Relative Hyperlinks in Excel Instead of OneDrive URLs
Product
Microsoft Excel for Microsoft 365 and OneDrive
Device & OS
not provided
Scenario
A workbook and its linked files are stored in nearby folders synchronized by OneDrive.
Observed behavior
Excel and OneDrive may replace relative file paths with cloud-based SharePoint URLs.
Before you start

Check that the workbook and target files are available locally in their synchronized folders, and note their folder relationship. Test links in desktop Excel after saving and reopening the workbook, since OneDrive integration may rewrite them.

Solution 1Recommended

Create and test a relative file hyperlink in Excel

Use this approach when the workbook and target files keep the same folder structure.

1
Find the target path

In File Explorer, locate the workbook and target file. For example, if the target is in a Docs folder next to the workbook folder, its relative path may be ..\Docs\file.pdf.

2
Enter the relative link

In desktop Excel, select a cell and choose Insert > Link. Enter the relative path in the Address field, set the display text, and select OK.

3
Save and test

Save and reopen the workbook, then select the link. Reopen the link editor to check whether Excel retained the relative address or replaced it with a cloud URL.

Create and test a relative file hyperlink in Excel
OneDrive may rewrite links: A relative address is not guaranteed to remain unchanged when Office and OneDrive synchronize the workbook. Keep the same folder structure and make the linked files available locally on each device.
Free Microsoft Office alternative

Work with Spreadsheet Links in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheets. Its Excel format compatibility makes it easier to move existing workbooks into WPS, although it does not change Microsoft OneDrive or Excel sync behavior.

Create and edit spreadsheet hyperlinks to local filesOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet menus for an easier transitionWork with a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel change my file link to a SharePoint URL?

Office and OneDrive integration may store or synchronize a hyperlink as a cloud address. Check the address through Excel's Edit Hyperlink option after saving and reopening the workbook.

Where can I turn off Office file sync integration?

Open OneDrive Settings from the cloud icon and look for an Office section. If available and permitted, clear “Use Office applications to sync Office files.” The option may not appear in every version.

Will a local path work for everyone who opens the workbook?

Not necessarily. An absolute path such as C:\Users\username\OneDrive\Docs\file.pdf depends on each user's account and folder location. A relative path may be more portable if the folder structure is the same, but it still needs testing.

Why do I see a warning when opening a local hyperlink?

Excel may display a security warning before opening a linked file. Confirm that the file and its location are trusted before proceeding; local paths do not automatically bypass Trust Center protections.