Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    38
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Excel 2010 File Sharing Violation - or file corruption ?

    Everything has been working fine with my Win 7 Pro/Excel 2010 application until this morning when I started getting a sharing violation message: " Your changes could not be saved to *filename* because of a file sharing violation ... etc" and the help just said its usually related to the antimalware program running, but the only one I have is MS Security Essentials and this is the only file that I have a problem with. It is a large xlsm file but it has very few and basic macros, though I could understand if its a file corruption issue since it has been in use tracking daily information for years.

    Since it appears to be only related to one file, shouldn't there be a way to use a file repair tool that I seem to recall from older Excel versions?

    Any thoughts would be welcomed

  2. #2
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,633
    Thanks
    115
    Thanked 647 Times in 590 Posts
    Terry,

    Take a look here. Several with the same issue found a resolution here:

    http://answers.microsoft.com/en-us/o...6404353?auth=1

    HTH,
    Maud

  3. The Following User Says Thank You to Maudibe For This Useful Post:

    TerryGH (2015-09-02)

  4. #3
    Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    38
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Thanks for the link, Maud, but that solution didn't work for for me.

    Not sure if it was since that post was 2003/2007 related and to files on a server or not, but I am the only user on this machine, and the issue persists, at least for XLSM files at least(I made a copy of the main tab to a new file and saved it as xlsx and it saved "normally" ....

  5. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,823
    Thanks
    135
    Thanked 481 Times in 458 Posts
    Hi Terry

    ..if you are having a problem with a large .xlsm file, try saving a copy as .xlsb format and work with that.
    The binary format .xlsb still allows macros to be used, but generally the file size is around 50% smaller than .xlsm format.
    If the file is half the size, it will be more efficient for network access.

    zeddy

  6. The Following User Says Thank You to zeddy For This Useful Post:

    TerryGH (2015-09-02)

  7. #5
    Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    38
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Hiya Zeddy,

    I just saved the file as suggested as .xlsb and it seems to save ok, so I will give that a shot. But is an xlsb format a long term solution for large files? And is a 1971kb file really that large? I thought 2010 was suppose to have solved all "large file" related problems. Thanks for the ideas ...

  8. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Quote Originally Posted by TerryGH View Post
    is a 1971kb file really that large?
    Nope. That's very small compared to most of the workbooks I deal with at work and even on my work laptop, Excel 2010 has coped with every one of them - apart from one which was 350MB. (Even then 64bit 2010 coped with it fine).
    Regards,
    Rory

    Microsoft MVP - Excel

  9. The Following User Says Thank You to rory For This Useful Post:

    TerryGH (2015-09-02)

  10. #7
    Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    38
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Thanks for the confirmation, Rory re file size not being the source of the problem.

    Temporarily at least I have copied the key tabs of the bad xlsm file to a new one and can at least work with that for now, but would sure appreciate any other ideas on how to know what would cause a "good" excel file to go bad, generate misleading error messages (e.g., sharing violations), etc. Actually I guess I am spoiled by this being the first such experience in 10+ years or at least going back to some old issues related to excel 2003.

  11. #8
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,823
    Thanks
    135
    Thanked 481 Times in 458 Posts

    Sharing violation in Excel

    Hi Terry

    The 'Sharing violation' is really a 'file locking' issue. Excel can't save a file if another program is accessing it. Excel creates a temp file (without a file extension) during the file save process. A timing conflict can occur during this process, e.g. if an anti-virus program is using real-time scanning and is currently checking the file, a compression program is currently accessing the file, an encryption program is currently accessing the file, a quota management is accessing the file, a Search Indexer is currently accessing the file etc etc etc Requests targeted at the file system are intercepted by filter drivers. To see what is being tracked, you can run the Filter Manager Control utility by typing FltMC in a Command Prompt window. (If you get 'Access is denied', right-click and select 'Run as Administrator' as shown here:
    zz1.GIF

    This won't help you, but shows you there's a lot going on 'under the hood'!

    So, as Rory says, your file is not particularly 'large', but my point about 'smaller' is to simply reduce the interaction time with the File I/O system. Excel .xlsx files are essentially zip files (if you make a copy and rename an existing .xlsx file as .zip (ignore the change-of-extension warning) and then double-click the .zip file, you will see subfolders, including subfolder named xl, and double-clicking subfolder xl will show more subfolders, including subfolder named worksheets etc etc)

    If you are the only user on the PC, browse to the folder that contains the file, right-click on the folder name, then select Share with > Nobody
    ..but I don't think that is your issue either.

    Is the Excel file linked to other Excel file(s)? Is it password-protected?

    As you are using MS Security Essentials, my recommendation would be to create a specific folder for the troublesome file, put the file in that folder, and exclude that entire folder from your MSE. See if that sorts it. I believe the sharing violation issue reported by Excel is with the temp file that is being created when you use Ctrl-S or File>Save. If you use File-SaveAs with a new name, you are less likely to encounter the issue. If you need to maintain the file with a very specific name, then use File-SaveAs a second time to overwrite.

    zeddy

  12. The Following User Says Thank You to zeddy For This Useful Post:

    TerryGH (2015-09-05)

  13. #9
    Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    38
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Thanks for the additional information, Zeddy -- will be valuable at some point down the road I am sure. For now, I have a new file with the needed tabs from the corrupted excel file and moving no problems. Coincidentally I had been working on a beta copy of the troubled file with some new macro capabilities so I am going to focus on that and as some would say, let the problems of this broken file go. Hopefully won't have to bother you good folk here with another bad file any time in the near future *s TerryGH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •