• Excel 2010 File Sharing Violation – or file corruption ?

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Excel 2010 File Sharing Violation – or file corruption ?

    Author
    Topic
    #501981

    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 …

    Viewing 3 reply threads
    Author
    Replies
    • #1526305
      • #1526333

        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” ….

        • #1526359

          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

    • #1526383

      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 …

      • #1526391

        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).

    • #1526497

      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.

      • #1526877

        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:
        41936-zz1

        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

    • #1527077

      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

    Viewing 3 reply threads
    Reply To: Excel 2010 File Sharing Violation – or file corruption ?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: