Excel Shared File Opens With Locked for Editing Message: Fix
🔍 WiseChecker

Excel Shared File Opens With Locked for Editing Message: Fix

When you open an Excel file stored on a network drive or SharePoint, you may see the message “Locked for Editing” even though no one else is using the file. This occurs because Excel detects a lock file that was not properly removed, often due to an unexpected crash, network interruption, or another user closing the file incorrectly. This article explains why the lock file persists and provides five methods to remove it so you can regain editing access.

Key Takeaways: How to Unlock an Excel File Showing “Locked for Editing”

  • Close Excel and delete the .lck file: Removes the lock file created by Excel when the file was opened.
  • Ask other users to close the file: If the file is shared, someone else may still have it open.
  • Use File > Info > Manage Workbook > Recover Unsaved Workbooks: Recovers your changes if the lock file was left after a crash.

ADVERTISEMENT

Why Excel Shows “Locked for Editing”

When you open an Excel file from a shared location, Excel creates a hidden lock file with the same name but with a tilde (~) prefix and a .lck extension. For example, if the file is named Sales.xlsx, Excel creates a file named ~$Sales.xlsx in the same folder. This lock file tells other instances of Excel that the file is in use. The message “Locked for Editing” appears when Excel finds this lock file and cannot determine whether the original user is still active.

The lock file is normally deleted when you close the file normally. However, if Excel crashes, the network disconnects, or the file is closed using Task Manager, the lock file remains. Excel then assumes the file is still in use by another user. This is a safety feature designed to prevent data loss, but it can cause inconvenience when the lock file is orphaned.

Steps to Remove the Lock File and Unlock the Excel File

  1. Close all instances of Excel
    Press Ctrl+Alt+Delete and select Task Manager. Under the Processes tab, look for any Microsoft Excel processes. Select each one and click End Task. This ensures no instance of Excel is holding the lock.
  2. Navigate to the folder containing the file
    Open File Explorer and go to the folder where the locked Excel file is stored. If the file is on a network drive, you may need to map the drive or browse through Network locations.
  3. Enable viewing of hidden files
    In File Explorer, click the View menu and check the box labeled Hidden items. This reveals the hidden lock file.
  4. Locate and delete the lock file
    Look for a file that starts with ~$ and has the same name as your Excel file, followed by .xlsx or .xls. For example, if your file is named Budget.xlsx, the lock file is ~$Budget.xlsx. Select it and press Delete. Confirm the deletion.
  5. Open the Excel file again
    Double-click the original Excel file. It should now open without the “Locked for Editing” message. If the message still appears, proceed to the next method.

ADVERTISEMENT

If the Lock File Is Not Visible or Cannot Be Deleted

“Locked for Editing” appears but no lock file exists

If you cannot see a ~$ file, the lock may be stored on the server. On SharePoint or OneDrive, the lock is managed by the cloud service. Open the file in Excel Online by right-clicking the file in the browser and selecting Open in Excel Online. If it opens, close it and then try opening in the desktop app again. This releases the server-side lock.

“You do not have permission to delete the lock file”

If you are on a network drive and do not have delete permissions, contact your network administrator. They can remove the lock file from the server side. Alternatively, ask the user who originally opened the file to close it properly.

File is locked by another user who is away

If the lock file shows a specific user name and that user is not actively using the file, you can ask them to close it remotely. If that is not possible, the administrator can disconnect their session from the server. On Windows Server, this is done through Computer Management > Shared Folders > Open Files.

Quick Repair vs Online Repair: Key Differences

Item Quick Repair Online Repair
Description Repairs Office installation without internet Downloads and reinstalls Office components
Time required 5-10 minutes 30-60 minutes
Fixes lock file issues No No
Fixes corrupted Excel installation Partial Full
Requires internet No Yes

Use Quick Repair first if you suspect a corrupted Excel installation is causing lock file issues. If that does not work, run Online Repair.

You can now resolve the “Locked for Editing” message by deleting the orphaned lock file or releasing the server-side lock. Next time you close a shared file, use File > Close instead of closing the window with the X button. As an advanced tip, you can prevent lock file issues by enabling AutoSave on OneDrive files, which reduces the chance of orphaned locks.

ADVERTISEMENT