- Saving an Excel workbook sometimes runs very slowly;
- A huge temp file is created;
- You get a 'Document not saved' error;
- Your current Excel session cannot save the file, no matter what you do;
- You've lost all your work since the last successful save.
This is a request for information from anyone else who's seen this issue, inviting your suggestions for workarounds, recovery strategies, and preventative measures.
Have you ever watched the folder your Excel workbook file is saved in, when you click 'Save' in Excel?
During the save process, Excel creates a temp file, with an arbitrary 8-character name and no '.xls' or '.tmp' extension. As soon as the write operation to this temp file is completed, the original file is deleted and this temp file is renamed to the original file name.
Sometimes this process goes wrong. Specifically: the Excel Application window stops responding to user input, but the screen still repaints and a 'Saving [filename] :' progress bar is visible in the application window.
The temporary file grows, and grows... And Grows.
Shortly after 2 GBytes - or if you run out of disk space - the temp file is deleted and Excel returns the 'Document not saved' error. This will take 10-15 minutes if you're lucky, and several hours if you're not. If you don't have an earlier copy of the file with your changes (or something in the autosave folder), you're completely out of luck: all your work since the last successful save is lost.
Nothing works: saving again repeats the process, 'Save As' into another file format (eg: a web page) repeats the process, after a delay.
I've seen this problem in four different companies; one of them (a large financial institution in New York, London, Zurich and Singapore) uses very large and complex spreadsheets with a lot of VBA, and most of the Excel developers have seen the problem.
Microsoft have nothing to say about it. A close reading of Microsoft's KB article on 'Document not saved' suggests that someone in Redmond has seen each separate part of the problem, but can't quite bring the parts together in a KB article that would acknowledge this specific issue.
Here's everything I know about it:
- I've only ever seen it over a network drive;
- I've only ever seen it after I've worked on VBA code in the file AND hit 'compile';
- I've mostly seen it with large files (over 50 MBytes) but today I saw it with a 780-kB file;
- I can't save the file from the current Excel session;
- I can export individual VBA modules;
- The network administrator is very annoyed about the traffic and the server space.
Here's some things I don't know:
- I haven't seen the problem in Excel 2007 or 2010, but I haven't used these later versions of Office enough to conclude that they don't exhibit this issue.
- All other versions of Excel from 1997 onwards can and will.
- I am not aware of any correlation with service packs, hotfixes, or third-party antivirus software.
- What is the cause of this problem?
- Can you recover from this error?
- What can you do to prevent it?