
When Excel says “Excel cannot open the file because the file format or file extension is not valid”, the file is often not damaged at all. The same message appears when a file has the wrong extension, was blocked by Windows after a download, or is only half downloaded from OneDrive. Real corruption usually comes from a save that was interrupted: a crash, a dropped network drive, a laptop that slept mid-save, or two people editing a synced copy at once.
The fastest route to your data is usually an earlier version, not a repair. A file stored in OneDrive or SharePoint keeps version history you can restore in a minute, and a repair can lose formulas, charts or formatting.
Before you try anything, make a copy of the file and work on the copy. Some steps below overwrite the original.
Try these first
- Copy the file to your desktop and try opening the copy; a network or sync problem can look like corruption.
- Downloaded or emailed? Right-click it, choose Properties and tick Unblock if it’s offered.
- In OneDrive or SharePoint, right-click the file and choose Version history to open an earlier copy.
- In Excel, use File > Open, select the file, then the arrow next to Open > Open and Repair.
- Check the real extension: a .csv or old .xls renamed to .xlsx won’t open as .xlsx.
Rather not fix it yourself?
A GoProIT technician can connect remotely, with your permission, and fix it while you watch. $59 flat per fix · Mon–Fri 8am–8pm ET.
Read the message first: it tells you where to start
| What Excel says | What it usually means | Start with |
|---|---|---|
| “Excel cannot open the file … because the file format or file extension is not valid” | Wrong extension, a blocked download, an incomplete file, or real damage | Extension check and unblocking, then earlier versions |
| “We found a problem with some content in … Do you want us to try to recover as much as we can?” | Part of the workbook is damaged, often a chart, PivotTable cache or formatting | Click Yes on a copy and save the result under a new name |
| “The file format and extension of … don’t match” | The contents are a different type than the name says, for example a web page or CSV saved as .xls | Open it only if you trust the source, then save it as a real .xlsx |
| “The file is corrupt and cannot be opened” on a downloaded file | Often Protected View or a Windows block, not damage | Unblock the file |
| A red Protected View bar: “Microsoft 365 has detected a problem with this file” | The file failed Office’s file validation check | Ask the sender to resend; edit only if you trust it |
| Excel freezes or crashes while opening it | Heavy calculation, an add-in, or damage | Excel not responding first |
| “Locked for editing by another user” | Not corruption; someone else has it open | Excel file locked for editing |
If every Excel file on one drive or share fails the same way, the files probably aren’t the problem. Look at the drive, the sync app or security software before repairing anything one by one.
Rule out the wrong extension and blocked files
Check what the file really is
Windows hides extensions by default. In File Explorer on Windows 11, choose View > Show > File name extensions. Then look at the name again:
- Exported from another program? Accounting, banking and payroll systems often produce CSV or HTML files named .xls. Open Excel first, then use File > Open and choose the file, or import a CSV with Data > From Text/CSV.
- Renamed by hand? Changing .xls to .xlsx doesn’t convert it. Rename it back and open it; then use File > Save As and pick Excel Workbook (*.xlsx).
- Macro workbook? A file with macros saved as .xlsx loses them, and one renamed from .xlsm to .xlsx can refuse to open. Try the original extension.
- Zero KB or very small? The file is empty or the save never finished. No repair will help; go straight to earlier versions below.
Unblock a downloaded or emailed file
Files from the internet and email attachments open in Protected View, and sometimes that shows up as “corrupt”. Save the attachment to a folder, right-click it, choose Properties, and on the General tab tick Unblock if it’s there, then OK. Open it again and select Enable Editing only if you trust the sender.
Don’t switch off Protected View in the Trust Center to get one file open. Microsoft designed it to stop malicious files, and a fake “corrupt invoice” spreadsheet is a common phishing trick. If you can’t leave Protected View at all, your administrator has probably set a policy that prevents it.
Restore an earlier version before repairing
A known-good copy from this morning beats a repaired copy that’s missing half its formulas. Check these in order.
OneDrive, SharePoint and Teams files
- In File Explorer, right-click a synced file and choose Version history. Select … next to the version you want and choose Restore, or open it first to check it.
- On the web, right-click the file in OneDrive or the SharePoint library and choose Version history.
- Restoring makes that version the current one, and the damaged one stays in the list, so you can always go back.
How far back you can go depends on the account and on your admin’s versioning settings for each library. Our page on Microsoft 365 version history and retention explains what’s kept and for how long.
Files on a PC, server or NAS
- File History (if it was turned on): right-click the folder that holds the file, choose Restore previous versions, pick a date, then use Restore to… so you don’t overwrite the current file. Microsoft warns that a plain Restore replaces it and can’t be undone.
- Server or NAS snapshots: many file servers and NAS boxes keep their own snapshots. They often appear in the same Previous Versions tab, or your IT provider can restore from backup.
- Excel’s own backup copy: if someone ticked Always create backup under File > Save As > Tools > General Options, a backup copy sits in the same folder.
For a file you never saved, or one that crashed mid-session, Excel’s Document Recovery and AutoRecover steps are covered in the Excel not responding guide linked in the table above.
Repair and salvage the data
Work on a copy, and if the file sits on a network drive or a failing disk, Microsoft’s advice is to move it to a local disk first.
1. Let Excel try
Excel often starts File Recovery mode by itself. If it doesn’t, use File > Open, select the workbook, choose the arrow beside Open and pick Open and Repair. Choose Repair first; if that fails, run it again and choose Extract Data. When Excel lists what it repaired or removed, read the list: “removed records: formula” means some cells now hold values instead of formulas.
2. Open it without recalculating
Start a blank workbook, set File > Options > Formulas > Calculation options to Manual, then open the damaged file. Because nothing recalculates, some files that crash Excel will open. Copy what you need out, and set calculation back to Automatic afterwards.
3. Pull the values out with a link
Microsoft documents a trick that reads data from a workbook Excel won’t open:
- In a new blank workbook, type
=Budget!A1in cell A1, where Budget is the damaged file’s name without the extension, and press Enter. - If Excel asks, point it to the damaged file and choose the sheet.
- Copy A1 across and down over an area the size of the original data.
- With it still selected, copy, then use Home > Paste > Values to turn the links into plain data.
You get the values only, not formulas or formatting, but for a price list or customer list that’s often enough.
4. Try another app
Upload a copy to OneDrive and open it in Excel for the web, which reads files differently from the desktop app and skips add-ins. If it opens there, download a fresh copy with File > Save As > Download a copy.
Rather have a technician sort it out?
If the workbook still won’t open, a technician can connect remotely with your permission, check earlier versions in OneDrive, SharePoint or File History, and recover what’s salvageable while you watch. A GoProIT technician can connect remotely, with your permission, and fix it while you watch. $59 per fix, Mon–Fri 8am–8pm ET.
When sync conflicts are the real cause
A lot of “corrupted” workbooks in small offices are really two versions fighting. Signs:
- A second copy appears with a computer name added to the file name, such as Budget-DESKTOP-4KQ2.xlsx. OneDrive keeps both when two devices change a file before either sync finishes.
- The file opens, but this morning’s changes are missing.
- The OneDrive icon shows a red X or a paused state; see OneDrive not syncing.
- Someone emailed the workbook around and saved the attachment back over the shared copy.
Open both copies, compare the last-modified details, and copy the newer data into one file. Then delete the extra copy so nobody edits it by mistake.
Stop it happening again
- Keep shared workbooks in SharePoint or OneDrive and open them from there with AutoSave on, so everyone edits one file.
- Retire old .xls files; they can’t use AutoSave or co-authoring. Save them as .xlsx.
- Don’t edit a workbook directly from an email attachment or a USB stick, and wait for the save to finish before closing the laptop.
- Make sure company files are backed up somewhere other than the sync app itself, such as our cloud backup and recovery service.
When it’s the drive, and when to stop
- Several unrelated files are damaged, or the PC reports disk errors: the drive may be failing. Copy everything you can to another drive now and stop saving to it. Running repair tools on a failing disk can make things worse.
- Every file on one network share fails: look at the server, NAS or security software, not the files.
- The file came from someone you don’t know and shows a file validation warning: don’t edit it. Ask the sender for a fresh copy through a channel you trust.
- The workbook is critical and no earlier version exists: stop experimenting on the only copy. Commercial repair tools exist, but uploading company or client data to an online “repair” website can break your confidentiality obligations.
If you’d rather someone else worked through versions and repairs, recovering a damaged workbook is a typical $59 remote fix through our remote computer help. You approve the session, and you can end it at any time.
Common questions
Can a corrupted Excel file be recovered?
Usually some or all of it, yes. The best result comes from an earlier version in OneDrive, SharePoint, File History or a backup, because nothing is lost from that point. If there’s no earlier version, Open and Repair, opening with calculation set to manual, and the external-reference trick can each recover data. A file that’s zero KB or full of zeros can’t be repaired.
Why does Excel say the file format or extension is not valid?
It means the contents don’t match what the extension promises, or Excel can’t read them. Common causes are a file renamed from .xls or .csv to .xlsx, an export from another program saved with an Excel extension, a download that was blocked or didn’t finish, and genuine damage from an interrupted save. Show file extensions in File Explorer before assuming the worst.
Will Open and Repair change my original file?
Open and Repair opens a repaired version; it doesn’t overwrite the original until you save over it. Save the result with a new name, compare it with any earlier version you can find, and check the list of what Excel repaired or removed. Formulas may have been replaced by values, and charts or conditional formatting may be gone.
Why did my Excel file get corrupted?
Most often a save was interrupted: Excel crashed, the laptop slept, a USB stick was pulled, or a network drive dropped while the file was writing. Sync conflicts and editing email attachments directly also cause damage. Less often it’s a failing disk, which tends to damage several files at once. A workbook that keeps getting damaged on one PC is worth checking for hardware problems.
Is it safe to use an online Excel repair tool?
Be careful. You’d be uploading the whole workbook, including customer, payroll or financial data, to a company you know nothing about. For business files, try Microsoft’s built-in options and earlier versions first. If you need a commercial tool, use desktop software from an established vendor that runs on your own PC, and check your client confidentiality obligations before sending files anywhere.
How do I stop Excel files from getting corrupted?
Store shared workbooks in OneDrive or SharePoint and open them from there with AutoSave on, so version history covers every change. Save old .xls files as .xlsx. Don’t edit attachments or files on USB sticks directly, close Excel before shutting the laptop, and keep a separate backup, because a sync app copies damage just as faithfully as good changes.