How to Fix a Sharing Violation Error in Excel

Several Windows users have been reaching us with questions after being unable to save the modifications they make on an Excel table. As it turns out, every time they try to save something, they are stopped by an error message saying that there’s a ‘sharing violation’ involving the Excel file. The issue is not exclusive to a certain Windows version since it’s reported to occur on Windows 7, Windows 8.1 and Windows 10.

Sharing violation error on Microsoft Excel

What is causing the Sharing violation error on Microsoft Excel?

We investigated this particular issue by analyzing various user reports and the fixes that most affected users have deployed in order to fix this problem. As it turns out, there are several different culprits that might end up producing this sharing violation error on Microsoft Excel.

  • Excel file is not permitted to get indexed – In most cases, this particular issue occurs in situations where the Excel file is located inside a folder that isn’t configured to allow the files inside to get indexed. If this scenario is applicable, you will be able to resolve the issue by modifying the Advanced Attributes settings of that particular folder.
  • Sharing Wizard is disabled – As it turns out, Excel and most of the other programs inside the Office suite require the Sharing Wizard to be enabled in order to work properly. Some users have reported that the issue was resolved after they re-enabled Sharing Wizard via the Folder Options menu.
  • 3rd party AV is hogging the Excel file – Several 3rd party AV suites (including Comodo, AVG, AVAST, McAfee, and Malwarebytes) are also known to produce this error by keeping the file busy while Excel is trying to write over it. If this scenario is applicable, you should be able to resolve the issue by disabling the real-time protection of your AV or by moving towards the built-in security option (Windows Defender)

If you’re currently struggling with the same error, this article will provide you with a collection of troubleshooting guides. Down below, you’ll find a collection of methods that other users in a similar situation have successfully used to fix the sharing violation error on Microsoft Excel. Each of the potential fixes featured below is confirmed to be effective by at least one affected user.

For the best results, we advise you to follow the methods in the order that they are presented since we ordered them by efficiency and difficulty. One of the methods below should resolve the issue regardless of the culprit that ends up causing it

Let’s begin!

Method 1: Allowing the Excel file to get indexed

As it turns out, the number one reason why this error occurs is if the excel file is located inside a folder that is not configured to allow the files inside to have their content indexed. Newer versions of Excel don’t play well with folders that don’t have this advanced attribute enabled, so the sharing violation error is thrown as a result.

Several affected users have reported that they managed to get around this issue by modifying the Advanced Attributes of the folder responsible so that the files inside are allowed to get indexed. Here’s a quick guide on how to do this:

  1. Close Excel completely and make sure that no instances of Microsoft Office are running in the background by checking the tray-bar icon.
  2. Navigate to the folder that holds the file in question, right-click on it and choose Properties from the context menu.
  3. Inside the Properties screen, select the General tab, then go to the Attributes section and click on the Advanced button associated with it.
  4. Inside the Advanced Attributes window, go to the Archive and Index attributes and check the box associated with Allow files in this folder to have contents indexed in addition to file Properties.
  5. Click Ok and then Apply to save the changes, then start Excel once again and see if you’re still encountering the sharing violation error when trying to save changes to that file.
Modifying the folder’s attributes to accept content indexing

If the same error is still occurring, move down to the next method below.

Method 2: Enabling the Sharing Wizard

Another fairly common culprit that might be responsible for the sharing violation error is a disabled Sharing Wizard. As it turns out, Excel needs this feature enabled in order to function properly. Some affected users have reported that the issue was resolved after they re-enabled the Sharing Wizard via the Folder Options screen.

Here’s a quick guide on how to enable the Sharing Wizard feature via the Folder Options menu:

  1. Press Windows key + R to open up a Run dialog box. Then, type “control folders” and press Enter to open up the Folder Options menu.
    Opening the File Explorer Options window via a Run box
  2. Once you’re inside the File Explorer Options screen, select the View tab. Then scroll down inside the Advanced settings options until you locate Use Sharing Wizard (Recommended). When you see it, make sure that the box associated with Use Sharing Wizard (Recommended) is checked, then click Apply to save the configuration.
    Activating the Sharing wizard
  3. After this modification is made, restart your computer and see if the issue is resolved once the next startup sequence is complete.

If you’re still encountering this issue, move down to the next method below.

Method 3: Disabling 3rd Party AV Real-Time Protection

According to various user reports, this particular issue can also be caused by an overprotective Antivirus suite. Comodo Antivirus, AVG, Avast, McAfee and even the Premium version of Malwarebytes (there might be others) are known to hogg the excel file while Excel tries to write over it (during the saving sequence), which ends up producing this error. As it turns out, Windows Defender does not have this problem.

If you’re also encountering the issue with a 3rd party antivirus, try disabling the real-time protection and see if you’re able to save the Excel file without getting the sharing violation while the AV is disabled. With most 3rd party AV suites, you can disable the real-time protection via the tray bar icon.

Disabling the real-time protection feature of Avast

In the event that you successfully prove that your AV is responsible for this error, you have two options moving forward – You either keep the AV disabled while you work in Excel, or you uninstall the AV completely and you switch to Windows Defender (the default antivirus).

If you decide to uninstall your current 3rd party AV suite, follow this guide (here) on uninstalling your current security scanner without leaving any remnant files.


Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.