Fixing “Excel file is locked for editing” in Shared Folders

The error “Excel file is locked for editing by another user” in Google Drive shared folders and Shared Drives occurs when Microsoft Excel encounters a lingering owner lock file (~$filename.xlsx), an unreleased operating system file handle, or a real-time presence conflict. Because Google Drive for Desktop streams files from the cloud rather than using Microsoft’s native SharePoint/OneDrive co-authoring engine, opening an .xlsx workbook locks the file locally, preventing other team members from saving changes until the lock is cleared.

Fast Fix

Ensure all users have closed the workbook. In Windows File Explorer or macOS Finder, enable hidden files and check the shared folder for a temporary lock file starting with a tilde and dollar sign (~$filename.xlsx). Delete this orphaned lock file and restart Google Drive for Desktop (Settings gear > Quit and relaunch) to clear the active lock state.

Diagnostic Snapshot

ParameterSpecification
Affected ApplicationsMicrosoft Excel (Windows & macOS) running over Google Drive for Desktop
Primary Symptom“File in Use: [Filename] is locked for editing by ‘another user’. Open ‘Read-Only’ or click ‘Notify’…”
Direct CauseOrphaned owner lock files (~$), hung Excel background processes (EXCEL.EXE), or concurrent desktop streaming edits
Data RiskLow to Moderate: Overwriting can cause branched “Conflicted Copy” files or lost offline calculations
Admin Access RequiredNo for deleting local temporary lock files; Yes if managing Google Workspace Shared Drive role permissions

Resolution Steps

Step 1: Terminate Hung Excel Processes

  1. Press Ctrl + Shift + Esc to open Task Manager (Windows) or open Activity Monitor (macOS).
  2. Look for any active instances of Microsoft Excel or EXCEL.EXE.
  3. Select the process and click End task (or Force Quit on macOS).
  4. Try opening the workbook again.

Step 2: Unhide and Delete Orphaned Lock Files

If all users have closed the workbook and the error persists:

  1. Open Windows File Explorer and navigate to the shared folder containing the locked workbook.
  2. Click the View menu at the top, select Show, and check Hidden items. (On macOS, press Cmd + Shift + . to toggle hidden files in Finder).
  3. Look for a dimmed file with the exact name of your spreadsheet prefixed by ~$ (e.g., ~$Financial_Report.xlsx).
  4. Select the ~$ file and press Delete.
  5. Allow Google Drive for Desktop a few seconds to sync the deletion to the cloud.
  6. Open your spreadsheet; it will now load with full read/write access.
Shared Folder Structure
├── Financial_Report.xlsx       <── Main Workbook (Keep)
└── ~$Financial_Report.xlsx     <── Hidden Lock File (Delete this)

Step 3: Manage Real-Time Presence Settings

Google Drive for Desktop provides an Office presence badge to notify you when others are editing. If this feature causes false locks or latency:

  1. Click the Google Drive icon in the system tray or menu bar.
  2. Click the Settings gear > Preferences.
  3. Click the inner Settings gear (top-right).
  4. Scroll down to Real-time presence in Microsoft Office.
  5. If presence alerts are causing sync contention across slow connections, you can toggle this setting to test behavior.

Step 4: Clear Local Drive Cache (If Lock Persists Locally)

If your local computer alone continues to report the file as locked after removing the ~$ file:

  1. Quit Google Drive completely (Settings gear > Quit).
  2. Clear temporary cache locks by following the safe cache rebuild steps.
  3. Relaunch Google Drive.

Hard Stops

  • Simultaneous Desktop Saving with Conflicted Copies: If two users edit the same Excel file on desktop simultaneously, Drive for Desktop cannot merge cell changes. It will create a second file named [Filename] (Conflicted Copy). Do not delete either file immediately. Open both workbooks side-by-side, merge the updated financial data or formulas manually, save the primary file, and only then archive the conflicted copy to prevent data loss.