Fix Sharing Violation Error in Excel
The sharing violation error in Excel has been around since MS Office 2007. That error message says: “Your changes could not be saved to “FileName” because of a sharing violation.”
When this problem comes up, users can’t save changes to some of their Excel spreadsheet files. It’s not a new problem, and Microsoft used to have a hotfix package for it, but it’s no longer available.
But you can still fix the sharing violation by trying one of the solution listed below.
Turn on the Sharing Wizard
Open File Explorer and click on theย three ellipses.
Press theย Optionsย button.

Under the View tab, locate and enable Use Sharing Wizard option.
Click Apply and OKย to save the new settings.

Save the corrupted Excel file with an alternative title
Open yourย MS Excel file.
Click on the File tab.

Select Save as and enter a different title for the file
Press theย Saveย button.

Save the file to an alternative folder
Select the Save as option.
Click onย Browse and select a different folder to save your file to.
Click theย Saveย button.

Uninstall third-party antivirus utilities
Some third-party antivirus programs can also cause the sharing violation error. So, you might be able to fix the problem by uninstalling third-party utilities. You can do that with Windows’ built-in uninstaller.
Enable indexing
Press Win+ E to open File Explorer.
Right-click the folder that includes the problematic Excel file and select Properties.

Press theย Advanced button.

Enable the Allow files in this folder to have contents indexed in addition to file properties option.
Clickย OKย to close Advanced window.

Click Apply option and click onย OK to save the changes.
Some users have confirmed that they were able to fix the problem by turning on file indexing for the folder that contains the Excel spreadsheet with the problem. This can be done with the help of your Windows PC’s built-in File Explorer.