Recovering Excel documents that were closed without saving

Can I ensure that if I mistakenly close a Microsoft Excel document without saving the latest version, that I can recover some of the work I've done?

I'm using Excel 2003.


Solution 1:

Look for any files in the following:

C:\Documents and Settings\username\Application Data\Microsoft\Excel\

In my case, I found an errant file here:

C:\Documents and Settings\username\Application Data\Microsoft\Excel\~ar3451.xar

For an Excel 2003 file on our office LAN the computer blue screened and all changes were lost to the document. I found the file shown in the above string and right-clicked, Open With Excel and voilà, there was the file with all of my changes.

Immediately saved it with new filename and back to work.

Solution 2:

Applies to Excel 2007 (and maybe 2003) on Windows 7.

Prior to Excel 2010, the Autosave feature creates hidden .xar files in "C:\Users\ username\AppData\Roaming\Microsoft\Excel". The filenames are generated, and don't relate to the Workbook name. When you close Excel and select NO to save changes, the related temp .xar file is deleted PERMANENTLY... However...

I have come up with a way of saving the files in this directory to a backup directory at regular intervals using Task Scheduler and Powershell - effectively backing up the autosave files. Reason being, you can then (copy your backed up file to a temp location so as not to screw the backup) rename the extension to .xlsx and open it in Excel !! - If it wasn't a .xlsx file, Excel will prob. give you an error, try other extensions (.xls / .xlsm ...etc).

This is how to do what I did...

  1. Open Task Scheduler (tap Windows Key -> start typing "task scheduler", press enter/click on it when result is at top of Start Menu).
  2. Click Action -> Create Basic Task
  3. Give it a name and click Next
  4. Select "When I log on" as the Trigger
  5. Select "Start a Program" and click Next
  6. Type "Powershell" in the Program Name, then
  7. in the "Add arguments (optional):" box, type "% {Copy-Item -path C:\Users\ username\AppData\Roaming\Microsoft\Excel\ -recurse -force -destination D:\Backup\ExcelAutosave}" (changing the username to your username obviously, and also modify the destination directory if you want), then click Next
  8. Then tick the box "Open the Properties dialog for this task when I click Finish", then click Finish.
  9. Under the "Triggers" tab, double click the "At log on" trigger, then tick the box "Repeat task every:" -> select an interval (i have 1 hour) and duration (i have 12 hours), make sure "Enabled" is selected, then click OK, then OK on the properties box.

I recall it may ask you to confirm that you wish to run a program with the following arguments or something...

Good luck!