You double-click a .xlsx from a SharePoint library or a mapped network drive and Excel spits back: Cannot access read-only document. You didn't open it read-only. Nobody warned you. It just refuses. I know this error is infuriating — especially when you've got a deadline and the file is sitting right there. Usually this hits in the morning when a teammate left the workbook open overnight, or after a VPN drop where the drive letter survived but the connection didn't.
Here's the thing most people miss: Excel isn't actually complaining that the file is read-only. It's complaining that it can't acquire a write lock. Those are different problems with different fixes.
What's actually going on
When you open an Excel file, Windows tries to grab an exclusive lock. If it can't, Excel falls back and asks if you want read-only mode. But with SharePoint/OneDrive-synced files and SMB shares, that fallback sometimes fails entirely and you get this error instead.
Three things cause it, in order of how often I see them:
- Someone else has the file open. On a network drive, that's a stale lock file (
~$filename.xlsx). On SharePoint, it's an active check-out or a session that never released. - Your Office Document Cache is corrupted. This is the sneaky one. Clearing it fixes maybe 40% of SharePoint cases.
- Permissions or credentials. The drive is mapped with old creds, or the SharePoint library grants you Read but not Contribute.
There's a fourth, rarer cause: the file has the Read-only attribute flag set at the NTFS level, or it lives on a DFS share where replication hasn't finished.
The fix, in order
1. Check if it's actually in use
For a network drive, look for the lock file in the same folder:
dir "\\server\share\folder" /a | findstr /i "~$"
If you see ~$budget.xlsx and nobody has the workbook open, delete it. Windows will let you. That lock file is orphaned from a crash or a dropped VPN session.
On SharePoint, click the file's ellipsis menu and check Manage access. If it shows someone holding a check-out, ask them to check in, or (if you're the owner) discard the check-out from the library settings.
2. Clear the Office Document Cache
This is the fix people skip because it sounds scary. It isn't. Close Excel, Word, and Outlook first.
- Open File Explorer and paste this into the address bar:
%localappdata%\Microsoft\Office\16.0\OfficeFileCache
- Delete everything inside. If Windows says files are in use, you missed closing an Office app — kill
WINWORD.EXE,EXCEL.EXE, andMSACCESS.EXEfrom Task Manager. - Reopen the file. Excel rebuilds the cache fresh.
On Microsoft 365 Apps (version 2308 and later), the cache path is the same, but if you're running the older perpetual Office 2019, swap 16.0 for 16.0 — same thing, they never updated the folder name.
3. Re-authenticate the connection
If the drive is mapped, Windows caches credentials per session. A password change or a policy push can leave you with a dead token.
net use * /delete /y
net use Z: \\server\share /user:DOMAIN\username *
The asterisk prompts for the password instead of echoing it into your command history. For SharePoint, sign out of Office entirely (File > Account > Sign out) and sign back in. Yes, it's annoying. Yes, it works.
4. Check the actual permissions
Right-click the file on the network share, Properties, Security tab. You need at least Modify. Read & Execute alone will trigger this exact error if another user has it locked.
On SharePoint, the permission you need is Contribute or higher. Read gives you read-only access, which is fine, but combined with an existing check-out you'll get the error instead of a graceful read-only prompt.
If it still won't open
Try these in order — they're progressively more annoying:
- Copy the file locally. If it opens from
C:\Temp, it's a network/permissions problem, not a file corruption problem. - Open in Excel directly via File > Open > Browse instead of double-clicking. This bypasses some shell-extension hooks that antivirus tools inject.
- Check for the Read-only attribute. Right-click, Properties, and look at the bottom of the General tab. If Read-only is ticked, untick it — but if it re-ticks itself, you're looking at a DFS or folder-level policy.
- Test with a fresh Windows profile. If a new local user can open the file fine, your user profile's Office registry hive is hosed. Repair Office from Apps & Features (right-click > Change > Quick Repair, then Online Repair if Quick fails).
- Disable the SharePoint sync client temporarily. OneDrive's Files On-Demand can hold a placeholder lock on files it's mid-sync on. Pause syncing and retry.
One more thing worth saying out loud: if this happens to one user, it's a client issue. If it happens to a whole team, it's a permissions or replication problem on the server side, and no amount of cache-clearing on the client will fix it. Escalate to whoever owns the SharePoint site or the file server — don't waste an afternoon on the wrong side of the problem.