Cannot access the file

Excel Hyperlink Error: Cannot Access the File on Network Drives

Excel throws 'Cannot access the file' when a hyperlink points to a mapped network drive or UNC path it can't read. Here's how to fix it for good.

You're in a spreadsheet someone built two years ago. You click a hyperlink in a cell that points to \\fileserver01\projects\2024\Q3\budget.xlsx and Excel pops up: "Cannot access the file." Meanwhile, you can paste that exact path into File Explorer and the file opens fine. You can even open the target file directly in Excel without issue. It's only the hyperlink that fails. That's the tell — this isn't a permissions problem on the file itself. It's a problem with how Excel resolves the hyperlink.

This hits most often after a laptop switches networks (VPN to office, or home to corporate), after IT remaps a drive letter, or when a workbook gets emailed to someone whose drive letters don't match. The author had S:\ mapped to the projects share. You have P:\ mapped to the same share. Excel looks for S:\, doesn't find it, and gives up with that vague "Cannot access the file" message.

What's actually going wrong

Excel hyperlinks store the path exactly as it was typed. If the author typed S:\Q3\budget.xlsx, that's what's baked into the cell. Excel doesn't translate mapped drive letters against your own drive mappings. It just hands the path to Windows and asks it to open the file. If you don't have S:\ mapped to the same location, Windows returns "file not found" and Excel reports it as "Cannot access the file."

The same thing happens with relative paths in workbooks stored on network shares. A hyperlink saved as ..\reports\final.xlsx resolves relative to the workbook's location. Move the workbook, and the link breaks silently.

There's a second, sneakier cause: Excel's Trust Center blocks certain file types or protocols. If the hyperlink points at a file type marked as dangerous (like .exe, or older formats like .xls in some configurations), Office refuses to launch it and shows the same generic error. And a third cause — Protected View. When the source workbook came from the internet or email, links can be disabled until you click Enable Editing.

Fix it step by step

  1. Check what path the hyperlink actually points to. Right-click the cell and pick Edit Hyperlink. Whatever's in the Address box is what Excel will try to open. Note whether it's a mapped drive letter (S:\) or a UNC path (\\server\share).

  2. Confirm that exact path works outside Excel. Open File Explorer, paste the address into the bar, and press Enter. If it fails there too, you've got a permissions or server problem, not an Excel problem. If it opens fine, the path itself is valid — you're dealing with an Excel-side issue and should keep going.

  3. Replace mapped drive letters with UNC paths. This is the real fix. Mapped drives are per-user and per-session. UNC paths work everywhere the share is reachable. Edit the hyperlink and change S:\Q3\budget.xlsx to \\fileserver01\projects\Q3\budget.xlsx. Test it. If it works, update every other hyperlink in the workbook the same way.

  4. Fix broken relative links. If the Address box shows something like ..\reports\final.xlsx, either the workbook moved or the target did. Change it to an absolute UNC path. Relative links only make sense when the whole folder tree travels together, which is almost never true in practice.

  5. Check Trust Center. Go to File > Options > Trust Center > Trust Center Settings > Trusted Locations. Add the network share as a trusted location. Also check Protected View — if the box for "Enable Protected View for files originating from the Internet" is checked, files from email attachments won't launch links until you click Enable Editing in the yellow bar.

  6. Verify credentials for the share. If the share requires different credentials than your current Windows login, Windows may be silently failing the connection. Open File Explorer, type the UNC path, and see if it prompts for credentials. Save them with "Remember my credentials." Then retry the hyperlink.

After step 3, if you still get the error, hit Ctrl+Shift+Esc, find Excel in Task Manager, and end the task. Reopen the workbook. Excel caches path resolution per session, and a full restart clears it.

If it still fails

Click the hyperlink and watch File Explorer. If Explorer opens and immediately shows a "Windows cannot access" dialog, the problem is on the network side — DNS, share permissions, or the share is offline. Test with \\server\share directly from a Run dialog (Win+R).

If the file is on SharePoint or OneDrive, use the HTTPS web URL instead of the local synced path. Synced paths break the moment someone renames a folder, and the local sync client has a nasty habit of pausing when it feels like it. Paste the browser URL from SharePoint into the hyperlink Address and you'll dodge the whole problem.

One last thing: if the workbook lives on a share and other users open it simultaneously, check whether the target file is locked by another process. Excel reports lock conflicts as "Cannot access the file" in some versions. Ask the person who has it open to close it, then retry.

Run a quick test to see if it's the path or Excel itself. Create a new cell, insert a hyperlink to a simple file on the same share (like a text file). If that opens and the original doesn't, the original link is bad. If nothing on that share opens, the share path is the issue. That test tells you which half of the problem to chase.

Related Errors in Software – Microsoft Office
DXGI_ERROR_INVALID_CALL Fix DirectX CreateTexture2D Failed Error Cannot Access Read-Only Document Excel 'Cannot Access Read-Only Document' SharePoint Network Fix 0x8004011B Fix Outlook Error 0x8004011B: Corrupt Mail Profile Fix Outlook freezes opening OneDrive attachments? Here's the fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.