{ 38 Intelligent Comments }

MS Excel: Sharing Violation Error When Saving Excel Workbook

Microsoft Excel 2007 Sharing Violation Save Error

Microsoft Office Excel Error: Your changes could not be saved to ‘filename.xls’ because of a sharing violation. Try saving to a different file.

This error occurs when you launch attempt to save an Excel workbook under various different circumstances.

This solution has been specifcally tested on Microsoft Excel 2007 running on Windows 7.

The Excel file that is open at the time is stored on a network shared drive located on a Windows 2003 server.

It is likely that you will also receive the following error in addition to the sharing violation error:

The file you are trying to open, ‘filename.xls’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file .  Do you want to open the file now?

It is thought that this error is being caused by a bug in the Excel 2007 Shell Extension msoshext.dll and only applies to MS Office SP1 and SP2 users.

Solution 1: Download & Apply Hotfix (office-kb982125-fullfile-x86-glb)

  1. Download the official Microsoft hotfix here
  2. Close all Microsoft Office products including Excel, Outlook, Word, Access and Powerpoint.
  3. Double click the office-kb982125-fullfile-x86-glb.exe file that you downloaded in step 1 and follow the wizard to install.
  4. Restart Windows.


Wow, 38 Comments! We've got a conversation going now. Join the discussion below!

  1. Aruna says:

    I have downloaded and installed sharing violation Hotfix but the error message appeared ” The expected version of the product was not found on the system” hopeless…………..

    1. ian says:

      Have you checked if you’re running the version of the product mentioned on your system?

  2. Andy says:

    I get the same problem with Excel 2010 when running it against large workbooks running on Google Drive.

    1. Rosco says:

      Hi Andy…
      Google Drive is quite new and because it’s a service that syncs your files up and down it’s probable that this error is appearing correctly – i.e. it is an actual sharing violation due to Google Drive locking the file during a sync. It’s worth investigating.

      1. Andy says:

        What appears to be happening is Google drive locks the temporary file during the save. However, once the sharing violation occurs I am unable to save the file at all…even to another drive outside Google drive and even if I suspend Google drive. It does something to lock the original file in such a way that cannot save and I lose all my changes.

        1. Rosco says:

          What version of Office are you using? Are you using Windows or Mac?
          is this reproduceable? i.e. does it happen every time?

          1. Andy says:

            Excel 2010 on Windows 7. Repeats consistently with a large workbook (bigger than 10 Meg).

            1. Rosco says:

              I simply can’t reproduce this problem Andy. I’ve tried the config you’ve said, Windows 7, Excel 2010, Google Drive, spreadsheet over 10MB (tried both XLS and XLSX). I can see the temp file getting created when I save and even if I repeatedly save quickly it doesn’t crack.

              Do you by change have the same file open on another PC somewhere?

              1. Andy says:

                Thanks for trying Rosco. I get the error consistently. I’ve just decided to use dropbox for that file…a second best for my needs, but so far I am not getting the same errors. And, no, it was not open on any other computer. I was just using Google Drive as a backup mechanism.

              2. KG says:

                Hi Rosco

                I’m having the exact same problem – but I’m not keen to move to Dropbox. Did you by any chance try and solve this problem?


            2. Greg says:

              I have the same problem under Windows 8 & Excel 2010, but have no problem on the other PC under Windows 7 and Excel 2013.
              The error doesn’t always happen, but in 90% of cases.

              1. Michael says:

                go to folder properties->security (Tab)->Advance->Change Permissions->Uncheck “Include inheritable permissions from his object’s parent” -> add.. -> (type) Everyone (OK) make sure you do this->check full Control Box (OK) ..then apply… ok ok.. you need to do this for the very top folder…then going down to the sub folder of the file…worked for me

  3. Sten says:

    I have the same problem, and it was caused by AVG anti-virus. Tried all the suggestions, and it stopped after I disabled the AVG anti-virus. After that I changed the Anti-virus to Avira and the problem seem to stop.

    1. Andy says:

      Thanks Sten. I am using Microsoft Security Essentials and that may be the problem. On the other hand Google Drive just seems less stable than Dropbox (GD shuts down pretty frequently) so maybe they will improve with time.

  4. Preeti Singh says:


  5. harrezz says:

    thx it works perfectly

  6. Inge says:

    This error message is driving me nuts! I have 2 PC’s at home which share files. Password_Protected.xlsm in question is 10.2KB

    From what I’ve read, this problem is NOT unique to my environment!
    WIndows 7, Office 2010, .xlsm with macros and 6-character SMALL password protection for file and macros.

    My work-around:
    – Made sure this is the ONLY open .xlsm
    – I save every 2nd or 3rd iteration!
    – Save works 8-10 times or NOT at all, even the first time
    – Open a new TEMP.xls and copy the changes there as a “hold”
    – Only solution is to ABORT everything in the .xlsm,
    leave TEMP.xls open
    – Open the file.xlsm again
    – Enter the change again by copying back from Temp.xls
    – Save again
    * Go on with life and get ready to safe the next change entry!!!

    * I’ve been reading for two (2) weeks and none of the
    suggestions I found have worked for me.

    Since I save the exact same file in the exact same
    folder with the exact same name ……????????????

  7. Nguyen Tien Dat says:

    I think every body no need to be worry, just update window and restart then everything will runs normally. That’s best way to solve this case.

    1. GBlanda says:

      Didn’t work for me.

  8. GBlanda says:

    I cannot save some xlsx or pptx 2010 files. The error message says a sharing violation. I can save to a subfolder, to a different name in the current drive, or to an older xls or ppt version. Just can’t save to the current name or rename another file to that name. I am running W10. Have run updates manually and am told that W10 and Office 2010 are up to date. An Office 2010 security update ran yesterday which is when I started having problems. Just sayin’

  9. Mark says:

    I’ve just started having this problem in the last month or so. I’ve been saving a rather large Excel file to my Google Drive folder without any issues, until this happened. Has anyone made any headway in solving???

    1. BertusZ says:

      When trying to save an excel document (office 2010) I also received privacy warning message:
      “This document contains macros, ActiveX controls, XML expansion pack information, or web components. These may include personal information that cannot be removed by the Document Inspector.”

      This could be fixed as follows:
      in FILE tab; options; trust centre; trust centre settings; privacy options
      Uncheck: Remove personal information from file properties on save.
      Then save the setting with OK and again OK.
      Since then my documents could be saved normally again

  10. Vunya says:

    I am having a very similar problem and I can’t find a solution anywhere! Just as with others, this started about a month and a half ago, and it was when one of my users decided to upgrade from Windows 8 to Windows 10. Using excel 2007. I have hundreds of xlsm files (one for each customer) on a dropbox account that 3 people share access to. One day, I started having problems opening and saving files. It doesn’t always happen, but probably 60% of the time, and even cancelling and trying again with the same file will often work. Its really annoying though because it messes up all my automated scripts that save the files upon doing other tasks.

    The error is a sharing violation. It says it can only open the file in read-only mode because the file is locked by another user (even when I know the file isn’t open on anyone elses computer). It says this with .xlsm files nobody has touched in months. Average file size is about 250kb. No problems with .xlsx files, and I haven’t made any code changes.

    A fix would be so greatly appreciated!!!

  11. Ulid47 says:

    interesting thread. I just stumpled over the problem after I changed from Avira to Defender with W10.1, Office 2010 on my Samsung notebook.
    The same program runs fine on my Asus Subnotebook, same environment using Defender since the beginning mid 2015.

    So what the hack shall I do now? Any idea?

  12. Ulid47 says:

    additional information: the sharing violation is bound to my Excel 2010 xlsm database spreadsheet with some vba macros automatically creating new files referenced in my excel database spreadsheet.

  13. Vunya says:

    I have found the solution to my problem, which hopefully applies to others with a similar problem. It is down the lines of what Ulid47 said.

    The problem was with Windows Defender (in my case with windows 8.1). When disabled, everything works fine. When enabled, it sometimes works ok but usually causes a sharing violation.

    I have done alot of searching and reading and this is my understanding of what is happening. When excel saves anything it creates a randomly named temporary file, then deletes the original file, then renames the temp file to the name of the original file (all in a very very short timeframe). This used to work fine until Windows Defender automatically updated sometime in fall 2015. It doesn’t happen with regular .xlsx files because Defender doesn’t see those as potential threats and ignores them, but macro files (.xlsm) can contain viruses since they have embedded code. Therefore Defender scans these files whenever created. So excel creates a temp file and tries deleting another file and renaming the temp file in a very short timeframe while defender is still busy checking it for a virus, and thus the sharing violation (Defender is using the file).

    I haven’t yet tested if other virus scanners cause the same problem, or if there are some settings you can add to Defender to ignore .xlsm files or delay scanning files for a brief moment, or any other potential fix.

    In the meantime, I just disable Defender whenever I am coding and developing my macro files, and have my macro files set up so they never need to be saved during normal use by the users. They save all their data in a raw .xlsx file and pull the appropriate data from this file when in use (using the macros I wrote with Defender off), so the only file that needs saving with the macro file is a .xlsx file which works fine.

    Many possible workarounds, but hopefully everyone can find one that works for them. Knowing the cause of the issue is the main thing.

  14. Ulid47 says:

    thanks to BertusZ for his solution of another problem with only one of my xlsm files. Solved!
    thanks to Vunya for her explanation of file saving mechanism and Defender behavior.

    I just installed the latest Windows 10 fix on my Notebooks and modified the Defender Settings (settings–>update & security–>for developers–>check Developer Mode) on my Samsung W10.1 with Office 2010. Now the problem is gone!
    On my Asus W10.1 notebook, the same file runs in Office 2013. With Office 2013, the Defender Problem does not show up! So, the settings remain unchanged, “sideload apps” checked.

    And yes, my first idea it must be related to shutdwon of Avira professional and switch to Defender for virus protection obviously was the right one.

    Also thanks to Rosco. proposedsolution.com really is a helpful forum

    Kind regards,


  15. Ulid47 says:

    my comment from January 28 has been – unfortunately – a little bit too optimistic. There are still sometimes sharing violations although in addition I have excluded checks of all .xlsm files by Defender. Go to Settings and scroll down to Exclusions, click Add an Exclusion. Go to Program exclusions and type the program name into the pop up window.

    I have added Excel.exe to the program exclusions now. The result is an impressive gain in start up and shut down performance of a 2 MB excel file and also, it seems as if this is THE solution. Cross my fingers… Pleasse try yourself.

    Have a nice week,

    1. Anonymous says:

      Weirdly, saving the document as xlm. worked for me

  16. Good information. Lucky me I ran across your blog by chance (stumbleupon).

    I have saved as a favorite for later!

  17. OZCANOZ says:

    I’m running Windows 10, Excel 2016 and suddenly in last couple of days I get these error message about sharing violations, and the documents changing to “read only” so I can’t save changes to critical documents.

    Would sure appreciate any help you can provide. i have done a full AVG scan with no problems found (AVG Internet Security). Any suggestions gratefully received.

    1. ngan says:

      you can try remove avg

  18. Liam Brown says:

    Thank you for this valuable information! But If the problem persists, try or install Long Path Tool program. It’s effective and efficient to use. I hope this helps because it helped me a lot. My friends recommended it to me so I’m recommending it to people who faced the same problems as I did.

  19. Jen Dallas says:

    Rename the file and save it in a different location. It worked

  20. Mia says:

    Hi! i had the same problem, i tried all the solution but it happened again. what should i do?

  21. drack says:

    it says the installation of the package has failed

  22. Dom says:

    Repair excel. Go to start, control panel, uninstall a program, look for microsoft office in the selection, click change on the top the selection menu, repair…solved

    1. Dom says:

      works for me

Leave a Reply