Where Excel stores old versions of your file
Excel keeps copies of your work in two places: on your computer in a hidden folder, and in the cloud if you use OneDrive or Microsoft 365. The easiest route depends on which one you use and how long ago you made the change you want to undo.
If you saved your file to OneDrive (Microsoft's cloud storage), you can recover versions up to 93 days old directly from the web. If you saved it only to your computer, Windows and Mac both keep temporary copies for a limited time. The catch: local recovery only works if you haven't closed and reopened the file too many times since the version you want.
Key Takeaways
- OneDrive stores version history for 93 days, and you can restore any of them by opening the file online and clicking the version history button.
- If your file is only on your computer, check the AutoRecovery folder first — Windows keeps it at C:\Users\[YourName]\AppData\Local\Microsoft\Office\UnsavedFiles.
- The Undo button (Ctrl+Z or Cmd+Z) works only while the file is open; once you close it, Undo is gone.
- If you closed the file without saving, look for a recovery prompt when you reopen it, or check the Recent Files list for a temporary copy.
- Time matters: local recovery files expire after a few days, so act quickly if you need a version from your computer.
Recovering from OneDrive version history
Open your Excel file in the web version of Excel (go to Office.com, sign in, and open the file from there). Click the File menu at the top left, then select Info. You will see a button labeled Version history — click it.
A panel opens on the right showing every saved version with a timestamp. Click any version to preview it. If that is the one you want, click Restore at the top of the preview. Excel will replace your current file with that version. The old version you just replaced stays in the history, so you can undo this action if you change your mind.
This works for files saved to OneDrive, OneDrive for Business, or SharePoint. If your file is only on your local computer, this option will not appear.
Finding AutoRecovery files on Windows
When Excel crashes or you force-close it without saving, Windows stores a temporary copy. Open File Explorer and paste this path into the address bar: C:\Users\[YourName]\AppData\Local\Microsoft\Office\UnsavedFiles (replace [YourName] with your actual Windows username).
You will see a folder full of .xlsx files with names like "Book1_[random numbers].xlsx". These are your unsaved versions. The file names do not tell you which is which, so you may need to open a few to find the right one. Right-click any file, select Open with, and choose Excel.
These temporary files expire after a few days, so if you are looking for something from more than a week ago, they are probably gone. Once you find the version you want, save it with a new name so you do not overwrite your current file by accident.
Finding AutoRecovery files on Mac
Mac stores unsaved versions in a different location. Open Finder, press Cmd+Shift+G to open the "Go to Folder" dialog, and paste this path: ~/Library/Containers/com.microsoft.Excel/Data/Library/AutoRecovery.
You will see a list of .xlsx files. Like on Windows, the names do not tell you much, so open them one at a time to find the version you need. Once you find it, save it with a new name when ready.
Mac also keeps a version history for files saved to iCloud Drive. If your file is there, open it in Excel, click File, then Version History to see previous saves — the same way OneDrive works on Windows.
Using the Undo button while the file is still open
If you have not closed the file yet, the simplest fix is the Undo button. Press Ctrl+Z on Windows or Cmd+Z on Mac to step backward through your changes one at a time. You can undo dozens of actions this way, depending on how many steps Excel has in memory.
The Undo history disappears the moment you close the file, so this only works while you are still working. If you closed the file and then realized you needed to undo something, Undo will not help — go to the AutoRecovery folder or version history instead.
What to do if you see a recovery prompt
Sometimes when you reopen Excel after a crash, a dialog box appears asking whether you want to recover unsaved changes. Click Yes or Recover — Excel will open the version it saved before the crash. You can then save it with a new name or decide whether to keep it.
If you dismiss this prompt by accident, you can still find the file in the AutoRecovery folder. The recovery prompt is just a shortcut to that same location.
Checking the Recent Files list
Open Excel and look at the Recent section on the start screen. You may see a file labeled something like "[Filename] (Recovered)" or with a date that is not today. These are temporary versions Excel saved. Click one to open it, then save it with a permanent name if you want to keep it.
This list only shows files Excel has already tried to recover for you, so it is not a full backup. But it is worth checking before you assume the file is gone.
Frequently Asked Questions
How far back can I recover a file?
OneDrive keeps versions for 93 days. Local AutoRecovery files on your computer last only a few days. If you need something older than that, you will need a backup you made yourself — a copy you saved to an external drive or a cloud service like Google Drive or Dropbox.
Can I recover a file if I saved over it by accident?
Yes, if you saved it to OneDrive — go to version history and restore the older version. If it is only on your computer, check the AutoRecovery folder. If neither has what you need, the file is likely gone unless you made a manual backup.
Will recovering an old version delete my new changes?
When you restore a version from OneDrive, the version you just replaced stays in the history, so you can switch back. On your local computer, always save the old version with a new name first, so you keep both copies and can compare them.
What if the AutoRecovery folder is empty?
The folder may be hidden. In Windows, go to View and check "Hidden items". On Mac, press Cmd+Shift+. (period) to show hidden files. If the folder still appears empty, the temporary files have expired — check OneDrive version history or look for a manual backup.
Can I turn off AutoRecovery to save space?
You can, but it is not recommended. AutoRecovery uses very little space and has saved many people from losing work. If space is tight, delete old files instead of turning off recovery.