none
sharing violations in Excel since Windows 7

    Question

  • Since installing Windows 7 (the released version) I am frequently getting the error "Your changes could not be saved to filename.xls because of a sharing violation.  Try saving to a different file."  It appears to only be happening in Excel (version 2007) and only if resaving a file that is already there.  Anyone got any suggestions?  I cannot find any help doing searches on the Internet.
    Thanks.
    • Moved by Carey FrischMVP, Moderator Friday, September 04, 2009 4:29 PM Moved to relevant category (From:Windows 7 Miscellaneous)
    Friday, September 04, 2009 3:32 PM

Answers

  • Using this procedure below has (so far) fixed mine.  I haven't had the error all day.

    From the OfficeScan Management console:

     

    1. Go to Networked Computers > Client Management
    2. Select the Windows 7 machine(s)
    3. Click on Settings > Real-time Scan settings
    4. Under User Activity on Files, choose Scan files being retrieved.

    5. Click Save

     

    Then restart the OfficeScan NT Listener service .

     

    • Marked as answer by fire9901 Friday, October 16, 2009 4:48 PM
    Friday, October 16, 2009 4:48 PM
  • I am having the same symptoms. It is some interaction between TrendMicro OfficeScan and Windows Search. If I disable either Trend or Search, the problem goes away.
    Friday, October 09, 2009 2:57 PM
  • I am having the same symptoms. It is some interaction between TrendMicro OfficeScan and Windows Search. If I disable either Trend or Search, the problem goes away.

    The moment I unsinstalled TrendMicro OfficeScan, all my sharing file violations disappeared! I'm now using avast! antivirus with no issues with my office applications. Thanks a lot for pointing out!
    Sunday, October 11, 2009 9:04 AM

All replies

  • Were those files created with a different version of Windows installed? If so you may need to take ownership of them.
    Saturday, September 05, 2009 4:36 PM
  • I am also encountering the same problem as fire9901. I don't think it's a file ownership problem. It happens even when you create a new excel file on windows 7 and try saving it. This sharing violation didn't happen when i was using Vista.
    Sunday, September 06, 2009 4:25 PM
  • No, these files were created in Vista.  I did a clean install of Win7 and then copied the files onto the computer when the Win7 installation was complete.
    Monday, September 07, 2009 4:05 AM
  • Then you should take ownership of the files and make sure that you have full control under Security in Properties.
    Monday, September 07, 2009 2:04 PM
  • I will try that tomorrow when I get back to work, but I don't think that is the issue.  It is only happening on Excel files.  If it was an ownership issue, it should be happening on all files. 
    Monday, September 07, 2009 2:43 PM
  • We also have at least 2 clean build Windows 2007 / Office 2007 (released version) users experiencing Excel sharing violations.  This happens both with newly created files and older versions created with Vista / Office 2007.  Neither users experienced Excel sharing violations previously and this behaviour does not occur when using other Office 2007 apps.

    - If anything, the behaviour exhibits more often when the file is left open for a period of time
    - No other users are accessing these the files in question at any time
    - The 'Owner' of the files is/was always the user with sharing violations
    - The files are all stored on local drives

    The 'Office diagnostics' utility detects no issues.

    Tuesday, September 08, 2009 3:10 PM
  • Please download Handle.exe from http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx and run it with the name of the file experiencing the error (e.g. handle.exe mydocument.docx).  Can you post the output of the command?
    -Matt
    Thursday, September 10, 2009 1:38 PM
    Moderator
  • This is the output before attempting to save the file.

    Handle v3.42
    Copyright (C) 1997-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com

    EXCEL.EXE          pid: 2512    6F0: C:\Users\daniel.lee.2008\HW3.xlsx
    EXCEL.EXE          pid: 2512    6FC: C:\Users\daniel.lee.2008\~$HW3.xlsx

    This is the output when the Excel sharing violations occur.

    Handle v3.42
    Copyright (C) 1997-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com

    EXCEL.EXE          pid: 2512    6FC: C:\Users\daniel.lee.2008\~$HW3.xlsx

    Sunday, September 13, 2009 9:02 AM
  • I messed around with this some over the weekend.  If I turn off the Autosave function of Excel (where it saves every X minutes) I don't seem to get that message (at least not as much).  After I went into a spreadsheet and turned off the autosave, I don't recall getting that message as long as i was working on that spreadsheet.
    Monday, September 14, 2009 12:59 PM
  • Having the same problem, although not only in Excel. I've experienced it in word and in Visio a couple of times.
    JGA
    Thursday, September 17, 2009 1:11 PM
  • I am having the same problem on Win 7 RTM.

    I have excel files on my desktop, some new and some moved over from my old Vista build.
    They are not shared, not networked, not even roaming profile.

    I open, make an edit and try to save, it says there is a sharing violation and saves the changes in a temp file on the desktop which name is just random number, no extension.

    I ran handles on a sheet running normally (i saved it ok):
    EXCEL.EXE          pid: 2776    92C: C:\Users\brendon.GRACELANDS\Desktop\~$Gracelands Passwords - Copy.xlsx
    EXCEL.EXE          pid: 2776    938: C:\Users\brendon.GRACELANDS\Desktop\Gracelands Passwords - Copy.xlsx

    Then I ran it again on the same sheet but when it would not save:
    EXCEL.EXE          pid: 1004    938: C:\Users\brendon.GRACELANDS\Desktop\~$Gracelands Passwords - Copy.xlsx

    I performed this operation several times and it seems that when there is a sharing violation it is because it has lost its handle on the original file, note that the file name has a '~$' in the second example.

    Anyone got any ideas?  I am pulling my hair out, getting sick of doing 'save as' and deleting the original files all the time.

    Brendon
    mmm... coffee...
    Tuesday, September 29, 2009 7:26 PM
  • i was wondering whether this problem happened when windows 7 was in beta or RC stage. it would be very strange to release a RTM that isn't even compatible with it's own microsoft software.
    Wednesday, September 30, 2009 12:30 AM
  • It was also doing it in RC.  I never tried beta so not sure there.
    The work around for me at the moment is to 'save as' and then replace existing file.

    Brendon


    mmm... coffee...
    Wednesday, September 30, 2009 3:04 AM
  • Has anyone figured out a solution - i have the same problem - windows 7 enterprise 64bit office 2007 - fresh install.
    Sunday, October 04, 2009 11:53 PM
  • I am having the same symptoms. It is some interaction between TrendMicro OfficeScan and Windows Search. If I disable either Trend or Search, the problem goes away.
    Friday, October 09, 2009 2:57 PM
  • I disabled AutoRecover and the problem has gone away. I am using the  Windows 7 Enterprise RC version and Office 2007.

    Friday, October 09, 2009 11:43 PM
  • I am having the same symptoms. It is some interaction between TrendMicro OfficeScan and Windows Search. If I disable either Trend or Search, the problem goes away.

    The moment I unsinstalled TrendMicro OfficeScan, all my sharing file violations disappeared! I'm now using avast! antivirus with no issues with my office applications. Thanks a lot for pointing out!
    Sunday, October 11, 2009 9:04 AM
  • I have uninstalled Trend Office Scan also and installed Microsoft Security Essentials x64 and it seems to be working fine now.
    Not an ideal solution as our Trend is managed by a server for updates, deployments etc.

    mmm... coffee...
    Sunday, October 11, 2009 7:53 PM
  • I will try to send Trend Micro support an email today.  It seems that OfficeScan is the common link with the problem.
    Monday, October 12, 2009 12:29 PM
  • Trend Micro support told me to install Officescan service pack 1 which was just released.  I will do that tonight  and see what happens.

    http://www.trendmicro.com/download/product.asp?productid=5

    Tuesday, October 13, 2009 8:22 PM
  • Back to the drawing board on this problem.... the Officescan SP1 didn't fix it.  If I turn off OfficeScan, then everything still works OK. 
    I have emailed Trend Micro tech support an update letting them know the issue is not resolved.
    Thursday, October 15, 2009 11:32 AM
  • OHHHH!  I have the same thing, I have OfficeScan too, on my Microsoft Windows 7 Professional RTM X64 (all updates) and Microsoft Office 2007 Pro SP2 (all updates) and I am the domain / local admin on my machine and I have this issue in MOSS (Microsoft Office SharePoint Server 2007) and checking out the files and at times I CAN check them in, but I have to check it out, RISK losing stuff, and check it in.  I am disabling my OfficeScan on my desktop and I HOPE to NOT have these problems are newly created Excel files that I have are having issues with Visio 2007 SP2 as well, and Word!

    Thank you for this koloblicin, I wasn't thinking that that was it as on my Vista Business x64 SP2 system, NO problems, Office 2007 SP2
    Friday, October 16, 2009 1:13 PM
  • Using this procedure below has (so far) fixed mine.  I haven't had the error all day.

    From the OfficeScan Management console:

     

    1. Go to Networked Computers > Client Management
    2. Select the Windows 7 machine(s)
    3. Click on Settings > Real-time Scan settings
    4. Under User Activity on Files, choose Scan files being retrieved.

    5. Click Save

     

    Then restart the OfficeScan NT Listener service .

     

    • Marked as answer by fire9901 Friday, October 16, 2009 4:48 PM
    Friday, October 16, 2009 4:48 PM
  • I might have to give this a go.  At the moment I have just removed Officescan from all my Win7 domain pcs and put on Microsoft Security Essentials instead.  No probs at all since I did this.
    mmm... coffee...
    Friday, October 16, 2009 9:06 PM
  • I am having the same problem BUT I am not running Trend.  I am running Vipre AV by sunbelt.  The problem goes away when I shutdown the AV.
    Thursday, October 29, 2009 2:25 AM
  • I think Windows 7 handles certain files differently from vista, causing all the  file violations, especially with older anitvirus versions. Go to http://www.microsoft.com/windows/antivirus-partners/windows-7.aspx and you will find virus solutions that should be compatible with Windows 7.
    Thursday, October 29, 2009 2:33 AM
  • In some cases, in the option review >> changes >> share work book and check the option there, in the majority of incidents the problem fix whit this, I have win7 and trend micro

    sorry the bad english, I just speak spanish
    Wednesday, November 04, 2009 6:01 PM
  • Hi.

    Yes, I've tried this one today and I'm sorry to say that it did not work for me. I've tried adding (it was missing) the registry key.

    First as a DWORD (32-bit) with a HEX vaule of 0 and second as a QWORD (64-bit) with a HEX value of 0.

     

    In both cases I rebooted the computer after adding the registry key - just to be certain, but unfortunately the problem with saving

    Word docx-files on the desktop remains. (it gives me the cannot save because of a sharing violation box)


    I'm still very interested in finding a solution to this problem, so please post any experiences / workarounds / solutions here.

    /JAW

    Thursday, December 03, 2009 8:59 AM
  • I have the same problem and wondering TrendMicro's response to your last mail?
    Thursday, December 03, 2009 1:12 PM
  • I am having the same problem as everyone else.  Running Vista 32bit RTM, Office 2007, Trend Office Scan 10 with Sp1.  We have about 30 machines running Windows 7 and so far all of them have this problem.  I have tried changing the setting to "Scan files being: retrieved" and that did not fix the problem.  I have found that stopping the Windows Search service (as noted by dprimus) OR unloading Office Scan makes the problem stop.  It seems to me that there is a sharing violation between Word/Excel, Search, and Trend.  I don't really want to disable Trend or Windows Search.  Does anyone know if there are any settings that can be tweaked in the Windows Search Service? 

    I am planning to call Trend today.  I will post back up if they are able to give me an answer.  
    Thursday, December 03, 2009 4:05 PM
  • Here's the response I got back from Trend today:

    Hi,

     

        Unfortunately this is known issue for Windows 7. Please try the ff.

     

    1st Solution

     

    1. On the Officescan Management Console. Go to Networked Computers>Client Management.

    2. Highlight a machine with the issue.

    3. Go to Settings>Real-time Scan Settings.

    4. Under User Activity on Files, change the Scan files being to created/modified.

    5. Click on Save.

    6. Observe if issue will still happen.

     

    If the 1st Solution does not work, do the ff.

     

    1. Open Registry Editor. Please make a backup before doing any changes.

    2. Create a DWORD registry entry "UseMapping" under

        HKLM\SYSTEM\CurrentControlSet\Services\vsapint\Parameters

    3. Set the value to "0" to disable the file mapping.

     

    Friday, December 04, 2009 9:14 PM

  • and finally TrendMicro advises me to remove the directories where the office files are saved from the indexing service ?

    http://esupport.trendmicro.com/Pages/sharing-violation-error-while-saving-Excel-or-Word-files.aspx

    Hmm.
    Tuesday, December 22, 2009 11:32 PM
  • Yes, that seems to work - but one can hardly call that a solution -nor a workaround. The whole purpose of the indexing service is that you can search within the \user\-tree,
    -like c:\Users\JohnDoe\Documents. I certainly hope Trend Micro continues looking for a proper solution.
    Tuesday, January 05, 2010 8:35 AM
  • I believe this is more of a Microsoft problem because when you save an excel file it will create a temp file and searchindexer.exe access excel temp file longer that cause sharing violation. It only looks like an Antivirus problem because they also need time to access the file for it to be scanned. This is the reason why the sharing violation went away if you turn off either windows search or your antivirus. It would be best if the solution will come from Microsoft since searchindexer.exe doesn't have much of the problem in other OS aside from Windows 7. If we force the Antivirus to create a fix, Antivirus scanning may not be as accurate as before since it need to scan faster than the normal way that is why i believe it would be best to wait for a fix on Microsoft.
    Tuesday, January 05, 2010 3:52 PM
  • I'm having the same problem, running Windows 7  64 bits and MS Office 32 bits... not sure what the problem is besides that it could be coming form the Trend Micro... 
    Kae
    Monday, March 22, 2010 6:12 PM
  • 1. go to computer

    2. network

    3.you will then be prompted to turn on file sharing, then turn it on.

    4. thats it.

    Monday, June 07, 2010 1:20 AM
  • I think this is definitely a problem in Excel, I am usin Office 2007, and Kaspersky Virus 2010 running on an XP system and get the same sharing problems. It seems to improve if the files are saved immediately after loading before making changes but I don't have much confidence in this as a solution.

    I thought at one point it may be due to the fact that the file had originally been in 2003 xls format and was used on an Apple system where it was changed to xslm (not sure whether this was in a windows emulator or Apple version of Office 2007.

    The other possibility of course is that it's related to oine of MS updates for Office

    Jon

    Monday, June 14, 2010 3:33 PM
  • Well, I installed Win 7 Professional and was having the same sharing problems.

    This is what I did to fix the saving/sharing issue in Win 7 64bit Professional. Nothing to do with antivirus program..

    - Right click the folder/drive where it was having problem saving.

    - Go to Properties.....Sharing....

    - Under Network File & Folder Sharing.......click Share

    - Select and add "Everyone" under drop down menu.

    - Give "Read/Write" permission...then click share...

    It will take less than a minute to take ownership.....and your problem will be gone..Now you can save without sharing violation.

    Hope this helps many  people facing this....CHEERS...:))

    Tuesday, January 04, 2011 6:36 PM
  • I have recently upgraded to Windows 7, and the rest of my team (5 people) are running XP. We have shared Excell 2007 files that we share all the time. When I try to save these Excell files I get a sharing violation error. Would this be due to my team members still being on XP? Or should that not matter?
    Tuesday, April 09, 2013 6:40 PM