You closed Excel and clicked “Don’t Save” by mistake. Or you saved over the good file with a version where data had been deleted. Or your computer shut down in the middle of a two-hour session. It happens all the time and, in many cases, it can be fixed, as long as you act quickly and know where to look.
Here are the methods that actually work, ordered from quickest to most involved: Excel’s AutoRecover, OneDrive and SharePoint version history, Windows previous versions and temporary files. You will also see what to configure so it doesn’t happen again.
First of all: what not to do
Your chances of recovering the file drop with every action you take after the problem. Keep this in mind:
- Don’t save the overwritten file again with more changes. Every save pushes the good version further away.
- Don’t empty the Recycle Bin or run disk cleanup tools: they can delete the temporary files you need.
- Don’t reinstall or repair Office yet. The recovery folder could be cleared.
- If the file was on a USB drive or a network folder, copy it to your local disk right now before going any further.
Case 1: you closed Excel without saving
While you work, Excel saves AutoRecover copies every few minutes. If you close without saving, it keeps the last copy for a few days. Where to find it depends on whether the workbook already had a name.
A new workbook you never saved
- Open Excel and go to File › Info.
- Click Manage Workbook and choose Recover Unsaved Workbooks.
- A folder opens with files that have the
.xlsbextension. Sort them by date and open the most recent one. - Excel shows a yellow bar indicating that this is a recovered file. Click Save As and save it under a new name in a normal folder.
A workbook that already had a name
Open the file and go to File › Info. Next to Manage Workbook you will see the autosaved versions, and one of them is labeled as closed without saving. Open it, check the data and use Restore or Save As.
If Excel crashed
When Excel freezes or the computer shuts down, the Document Recovery pane appears on the left the next time you open Excel, listing the available versions. Check each one (the date and time tell you which is the most complete) and save the one you need before closing the pane. If you close it without saving, those copies may be lost.
Case 2: you overwrote a file stored in OneDrive or SharePoint
This is the best-case scenario. OneDrive and SharePoint keep previous versions of every file automatically, and with AutoSave turned on a new version is created very often.
- With the file open, click its name in the title bar or go to File › Info › Version History.
- The side pane lists the versions with date, time and author.
- Open the version you want. It appears in a separate window, in read-only mode.
- Click Restore to make it the current version again, or use Save As if you would rather keep both.
It also works from the browser: in OneDrive, right-click the file and choose Version history.
Case 3: you overwrote a file stored only on your computer
Excel can’t help here, because saving replaced the file. The way out depends on your operating system and on the backups you had turned on.
Previous versions in Windows
- Open File Explorer and find the file or the folder that contains it.
- Right-click, choose Properties and open the Previous Versions tab.
- If a version is listed, select it and click Open to review it, or Restore to recover it.
This tab only shows something if you had File History or restore points covering that drive turned on. If it is empty, there is no copy to recover this way.
Time Machine on a Mac
If you use Time Machine, open the file’s folder in Finder, enter Time Machine, go back to a date before the mistake and click Restore. If the file is in OneDrive, version history works just as it does on Windows.
Case 4: look for temporary files manually
If none of the above works, you can still search for AutoRecover copies directly on the disk. On Windows, these are the usual locations:
| Type of copy | Usual folder on Windows |
|---|---|
| Unsaved workbooks | C:UsersYourUserAppDataLocalMicrosoftOfficeUnsavedFiles |
| AutoRecover | C:UsersYourUserAppDataRoamingMicrosoftExcel |
| System temporary files | C:UsersYourUserAppDataLocalTemp |
The AppData folder is hidden: type the path straight into the File Explorer address bar, or press Windows + R and type %appdata%. Look for .xlsb, .xar or .tmp files with a date and time close to when you were working. Copy the file to another folder, change its extension to .xlsx (or to .xlsb if it won’t open) and try to open it in Excel.
Files that start with ~$ and sit next to your original workbook are no use: they are just markers showing the file is open and don’t contain your data.
When the recovered file won’t open or is damaged
Temporary copies and files recovered after a power cut are sometimes damaged. Excel warns that it found unreadable content or that the file format doesn’t match the extension. Try these steps in order:
- Go to File › Open › Browse, select the file, click the arrow next to the Open button and choose Open and Repair.
- In the prompt, click Repair first. If that doesn’t work, repeat the process and choose Extract Data, which rescues the values even if the formulas are lost.
- If Excel still can’t open it, try our free tool to repair damaged Excel files: upload the xls, xlsx or csv file and download a copy with whatever data could be rescued.
Once you have two versions (the recovered one and the one you already had), don’t check them by eye. You can compare the two Excel files to see exactly which cells differ and keep the best of each.
How to stop it from happening again
Take two minutes to review these settings in File › Options › Save:
- Turn on Save AutoRecover information every and lower the interval to 5 minutes (the default is usually 10).
- Tick Keep the last AutoRecovered version if I close without saving.
- Check the AutoRecover file location so you know where to look if you ever need it.
Also, store your important workbooks in OneDrive or SharePoint and turn on the AutoSave switch in the top-left corner: every change is saved instantly and you get version history. If you work locally, turn on Windows File History with an external drive. And before making big changes, such as deleting columns or pasting data over existing data, use Save As with a new name, for example Sales_v2.xlsx.
Conclusion
Recovering a lost Excel file depends mostly on where it was stored. If you closed without saving, look first in Recover Unsaved Workbooks or in the versions under File › Info. If you overwrote a file in the cloud, version history fixes it in a minute. If it was a local file, your real options are Windows previous versions or Time Machine. Act fast, don’t save over it and, once you get it back, turn on AutoSave so you don’t have to rely on luck next time.
Frequently asked questions
How long does Excel keep unsaved workbooks?
Usually about four days. After that, or if the temporary files folder is cleaned up, the copies are deleted. That is why it pays to look for them as soon as possible.
Can I undo a save in Excel?
If the file is still open, yes: undo the changes with Ctrl + Z and save again. If you have already closed it, you need cloud version history or a system backup.
Does recovery work in Excel for Mac?
Yes. Excel for Mac also saves AutoRecover copies and shows recovered files when it reopens after an unexpected shutdown. For overwritten files, use version history if the file is in OneDrive, or Time Machine if it is local.
Why is nothing listed in Recover Unsaved Workbooks?
AutoRecover may have been turned off, or the save interval may not have passed since your last changes. If the workbook already had a name, the copy doesn’t appear there but in the versions under File › Info. As a last resort, check the folders in the table above.
Try our free tools
Compare, convert, merge and clean your spreadsheets right in your browser, with nothing to install.