logo
search
Permission & Access Issues

How to Fix Cannot Move Excel Folder Because of a Sharing Violation

Camila MilosovichCamila Milosovich Sep 28, 2026 868 views

Question details

The user is unable to move, rename, or delete a folder containing an Excel (XLSM) file due to a sharing violation error, even when the Excel application appears to be closed.

How to Fix "Cannot Move Excel Folder Because of a Sharing Violation" Error
Product
Microsoft Excel
Device & OS
not provided
Scenario
Attempting to move or rename a folder that contains an XLSM file or an empty subfolder, often occurring after a recent Office update.
Observed behavior
A sharing violation error is displayed, indicating the folder or file is locked by a background process and preventing the user from completing the file operation.
Before you start

Ensure that all visible Excel windows and other Microsoft Office applications are completely closed. It is also recommended to save any unsaved work in other applications before attempting to forcefully close background processes.

Solution 1Recommended

Use Sysinternals Process Explorer to Unlock the Folder

Identify exactly which background process is holding a handle on your Excel folder or XLSM file and safely terminate it.

Often, a hidden background process keeps a lock (handle) on the folder, preventing Windows from moving it. Sysinternals Process Explorer is an advanced Microsoft utility that allows you to find and terminate these stubborn locks.

1
Download Process Explorer

Download and run Sysinternals Process Explorer from the official Microsoft documentation website.

2
Search for the locked handle

Click on the 'Find' menu at the top of Process Explorer and select 'Find Handle or DLL...' (or simply press Ctrl+F).

3
Locate the Excel folder

Type the exact name of the locked Excel folder or the XLSM file into the search box and click 'Search'.

4
Close the handle

Click on the matching result to highlight it in the main window. In the lower pane, right-click the highlighted handle and select 'Close Handle' to unlock your folder.

Use Sysinternals Process Explorer to Unlock the Folder
Safety Warning: Only terminate handles or processes that you recognize and are safe to close, such as stuck excel.exe background processes. Do not terminate essential system processes.
Free Microsoft Office alternative

Experience Hassle-Free Spreadsheet Management with WPS Office

If frequent background process locks and sharing violations in Microsoft Office disrupt your workflow, consider switching to WPS Office. It is a highly compatible, lightweight alternative that avoids unnecessary background locking.

  1. 1. Download and Install: Get the free installer from the official WPS Office website and complete the setup.
  2. 2. Open WPS Spreadsheets: Launch the application and utilize the tabbed workspace for your spreadsheet tasks.
  3. 3. Load your Excel Files: Click 'Open' and select your existing .xlsx or .xlsm files to continue working seamlessly.
Fully compatible with Microsoft Excel formats, including .xls, .xlsx, .xlsm, and .csv.Lightweight architecture ensures no ghost processes are left behind to lock your folders.Free to use with a familiar, easy-to-navigate tabbed interface.Seamlessly open and edit XLSM files without worrying about sharing violation errors.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my computer report a 'sharing violation' when Excel is already closed?

Even if the visible Excel window is closed, a background process (like a crashed excel.exe instance, the Windows Explorer preview pane, or an antivirus background scan) might still be holding a 'handle' on the file or folder, signaling to the OS that it is still in use.

Can I move the individual XLSM files instead of the entire folder?

Yes, in many sharing violation scenarios, you can successfully move individual files out of the folder. The system lock is often placed on the folder directory itself or an empty subfolder rather than the specific spreadsheet files.

How do I fix sharing violations caused by the Windows Explorer preview pane?

Open File Explorer, navigate to the 'View' tab at the top, and ensure the 'Preview pane' is toggled off. The preview pane sometimes locks Excel files to generate a thumbnail, which triggers a sharing violation when you try to move or delete the parent folder.