How to Fix Excel “File in Use” or Locked for Editing Error

Opening a shared workbook or local spreadsheet in Microsoft Excel only to receive an alert stating that the file is locked for editing by “another user” (or frequently by your own user account) is a frequent workplace frustration. When this occurs, Excel restricts you to opening a read-only copy or waiting for notification when the file becomes available. This error usually stems from orphaned owner files created by Excel, background office processes failing to terminate cleanly after an unexpected crash, or cloud sync clients holding open file handles. Resolving this lock requires clearing phantom background sessions and temporary ownership tokens.

Terminate Ghost Excel Processes in Task Manager

Often, an earlier Excel session crashes or closes its user interface whilst leaving the core engine running invisibly in the background, keeping the file lock engaged.

  1. Right-click the Windows taskbar and select Task Manager (or press Ctrl + Shift + Esc).
  2. Under the Processes tab, look for any instances of Microsoft Excel listed under either Apps or Background processes.
  3. Select each instance of Excel and click End task in the top toolbar.
  4. Navigate to your document folder and attempt to open the spreadsheet again.

Clearing lingering background tasks releases abandoned file locks instantly without requiring a full computer reboot.

Unhide and Delete Orphaned Temporary Lock Files

Whenever you open a spreadsheet named Budget.xlsx, Excel creates an invisible temporary lock file in the same directory titled ~$Budget.xlsx to track document ownership. If Excel crashes, this lock file remains stranded on your drive.

  1. Open File Explorer and navigate to the folder containing your locked spreadsheet.
  2. Click the View tab in the ribbon (or the View menu in Windows 11), select Show, and ensure Hidden items is ticked.
  3. Look for a dimmed file icon starting with a tilde and dollar sign (e.g. ~$Filename.xlsx).
  4. Select the temporary file and press Delete.
  5. If Windows warns that the file is in use, verify that all Office programmes are fully closed before deleting.

Deleting orphaned ownership files removes the false lock token, allowing Excel to launch the primary document with full read and write permissions.

Disable the File Explorer Preview Pane

Windows File Explorer includes an interactive preview pane that renders spreadsheet previews. This preview handler frequently opens background file streams that Excel flags as conflicting sessions.

  1. In File Explorer, look at the top command bar.
  2. Click the View menu and select Panes (or toggle the Preview icon).
  3. Ensure the Preview pane option is completely turned off (unticked).
  4. Similarly, ensure the Details pane is turned off if enabled.
  5. Close and reopen File Explorer, then open your Excel workbook.

Disabling document previews prevents Windows from locking shared files whilst you browse directories.

Manage Conflicted Cloud Syncing in OneDrive and SharePoint

If the workbook resides in Microsoft OneDrive, SharePoint, or a corporate network drive, synchronisation hiccups can trap the file in a pending state.

  1. Check the OneDrive cloud icon in your system tray to ensure files are fully synchronised and not paused or reporting errors.
  2. If the file is hosted on SharePoint, ask your team administrator or co-workers whether someone left the document checked out.
  3. In corporate SharePoint libraries, click the three dots beside the file, choose Check in, or ask the site owner to discard the previous checkout.
  4. If necessary, right-click the file in your local OneDrive folder and select Always keep on this device to force a fresh offline cache before opening.

Aligning cloud synchronisation states eliminates multi-user editing conflicts and restores real-time co-authoring functionality.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.