Opening an essential shared budget spreadsheet, project tracking workbook, or sales inventory model in Microsoft Excel only to be greeted by the dialogue box “File in Use: Workbook.xlsx is locked for editing by another user. Open ‘View-Only’ or notify when available” creates an immediate roadblock for collaborative teams. While this locking mechanism is designed to prevent data corruption by ensuring multiple editors do not overwrite each other work simultaneously, this error frequently appears even when the other named user closed the spreadsheet hours ago or is away from the office. When an Excel session terminates unexpectedly (due to a system crash, network blip, or forced reboot), the file server or cloud sync client fails to release the exclusive file lock handle. This guide explains how file locking works and details proven steps to release orphaned handles and restore full read-write access.
Why Does Excel Report That a File Is Locked for Editing?
File locking mechanisms ensure transactional data integrity across local file servers, SharePoint libraries, and OneDrive:
- Orphaned Owner Temporary Files: When you open a workbook, Excel creates an invisible lock file in the same directory (e.g.,
~$Workbook.xlsx). If Excel crashes, this lock file remains on disk, falsely indicating an active session. - Stalled Open Handles on Network Shares: On Windows Server SMB shares, the server maintains an open session lock until the server TCP keep-alive timer expires.
- Conflicting Co-Authoring Configuration: Legacy workbook formats (such as
.xls) or workbooks containing legacy Shared Workbook features cannot support modern real-time co-authoring. - Local Office Document Cache Desynchronization: Stale caching tokens in the Microsoft Office Upload Center preventing new status updates from registering.
- Background Antivirus File Scanning: Real-time endpoint security suites holding exclusive read locks while scanning large spreadsheets.
Method 1: Delete the Hidden Owner Lock File (~$filename)
Manually removing the temporary lock marker that Excel failed to delete upon exit.
- Ensure Microsoft Excel is completely closed on your computer.
- Open File Explorer and navigate to the directory where the locked Excel workbook is stored.
- Click the View tab in the File Explorer ribbon, select Show, and ensure Hidden items is checked.
- Look for a hidden file with the exact same name as your spreadsheet, prefixed with a tilde and dollar sign (e.g.,
~$Budget.xlsx). - Right-click this temporary file and select Delete.
- Once deleted, double-click your main workbook to open it with full read-write editing permissions.
Method 2: Close Open File Handles on Windows Server (SMB Shares)
If the workbook is hosted on an office file share or NAS, release the locked session via Computer Management.
- On the file server hosting the shared folder (or ask your network administrator):
- Press Windows Key + R, type
compmgmt.msc, and press Enter to launch Computer Management. - In the left sidebar, expand System Tools > Shared Folders > Open Files.
- Scroll through the list to find the problematic Excel spreadsheet path.
- Right-click the entry and select Close Open File.
- This immediately releases the exclusive SMB lock handle on the server without requiring a server reboot.
Method 3: Upgrade Legacy Formats to Enable Real-Time Co-Authoring
Legacy file formats lack support for simultaneous multi-user editing, forcing exclusive locks.
- Open the file in Read-Only mode.
- Click File > Save As > Browse.
- In the Save as type dropdown menu, select Excel Workbook (*.xlsx) instead of legacy
.xlsor older shared templates. - Save the file with a new name onto OneDrive or SharePoint.
- Enable the AutoSave toggle in the top-left corner of Excel. Modern
.xlsxformats on OneDrive support true real-time simultaneous co-authoring without locking users out.
Method 4: Terminate Orphaned Excel Background Processes
A phantom Excel process running in the background can hold locks even if no window is visible on your screen.
- Press Ctrl + Shift + Esc to launch Windows Task Manager.
- In the Processes tab, look for Microsoft Excel.
- If an instance of Excel is listed under Background processes, click on it.
- Click End task in the top-right corner.
- Wait 5 seconds, then attempt to open your spreadsheet again.
Method 5: Clear Office Document Cache
Purging stale upload queue items resolves synchronisation deadlocks for cloud-hosted files.
- In Excel, navigate to File > Options.
- Select Save in the left navigation panel.
- Scroll down to the Cache Settings section.
- Click the button Delete cached files.
- Confirm the prompt by clicking Delete cached information.
- Restart Excel; open your cloud workbook afresh from SharePoint or OneDrive.