Excel File Format or File Extension Corrupted? What to Do

How-to basics · Updated November 19, 2026

If Excel reports that a file format or file extension is not valid, the extension may not match the file’s actual format, or the workbook may be damaged; the message alone does not tell you which. First make a copy of the file, then check its source and extension before trying Excel’s repair option.

What the error means

Excel uses a file’s contents, not just the letters after its final period, to determine how to open it. An extension such as .xlsx is a clue about the format the file should contain. If the contents do not match that format, Excel may refuse to open the file and show a message such as “Excel cannot open the file because the file format or file extension is not valid.”

The warning can point to a simple naming problem, a file that was incompletely downloaded, or genuine damage to the workbook. It can also arise when a file was created by another program or renamed without being converted. The message is a prompt to investigate, not proof that every worksheet or piece of data has been lost.

One important distinction: an extension is not a conversion tool. Changing report.csv to report.xlsx in File Explorer does not turn comma-separated text into a proper Excel workbook. To convert a file, open or import it in an application that understands its current format, then save it in the desired format.

How extensions and workbook formats differ

Excel supports several formats with different capabilities. The familiar extensions identify different ways of storing spreadsheet data, and choosing the right one matters when you need macros, older-version compatibility, or a plain-text export.

  • .xlsx: The standard XML-based workbook format for modern Excel. It does not store VBA macros.
  • .xlsm: An XML-based workbook format that can store VBA macros. A macro-enabled file can still be unsafe; the extension does not establish that its code is trustworthy.
  • .xls: The older Excel 97–2003 workbook format. It may be needed for compatibility with older software, but it has format limitations compared with newer workbooks.
  • .xlsb: Excel’s binary workbook format. It can support workbook features including macros, but it is not the same format as .xlsx.
  • .csv: Plain text data organized with separators, commonly commas. A CSV does not retain workbook features such as multiple sheets, formulas as formulas, formatting, charts, or macros.

Modern .xlsx and .xlsm files are package formats containing multiple components, while .xls is a legacy binary format. That internal structure explains why a file can have a plausible name yet fail validation: Excel checks whether the contents make sense for the claimed format. Renaming an extension cannot rebuild missing or inconsistent content.

Common reasons Excel rejects a file

Start by considering what happened immediately before the error. A file received by email, downloaded from a website, copied from removable storage, or transferred through a sync service may be incomplete. A browser or transfer may have saved an error page or partial download under a spreadsheet-looking name. If the file size is unexpectedly small, obtain a fresh copy from the original source rather than repeatedly attempting repairs.

Other frequent causes include a mistaken extension, an export produced in a different format, interrupted saving, storage or synchronization problems, and damage to the workbook’s internal structure. A file created by a third-party application may use a format Excel does not support as expected, even if the extension resembles an Excel extension. An older Excel version or an incompatible application can also complicate opening or saving a workbook, though that is not automatically evidence of corruption.

There may also be a security or trust issue rather than a damaged file. Files from the internet or email can open in Protected View, or organizational settings may restrict them. Those situations usually present a security notice or blocked-content message, not necessarily the invalid-format error. Do not disable security features simply to make an unfamiliar file open.

Check the file before attempting repair

Keep the original unchanged. In File Explorer, make a duplicate and work on the copy; avoid overwriting the only version with an attempted repair. If the file is stored in OneDrive, SharePoint, or another versioned service, check whether an earlier version is available before editing or replacing it.

On Windows 11, File Explorer can show full extensions from View > Show > File name extensions. In other Windows layouts, the setting is available through File Explorer’s View options. This helps reveal names such as budget.xlsx.csv or a file that is actually named budget.xlsx.txt. If extensions are hidden, renaming the visible part of a filename may not change the real extension.

Then verify the source and format:

  • Ask the sender which application created the file and which format they intended to send.
  • Check whether a fresh download or a new attachment works, and compare file sizes if both copies are available.
  • Confirm that the extension is appropriate for the intended file. Do not guess based only on the file’s name.
  • If the file is a CSV or another text export, try opening it through Excel’s import process rather than treating it as a workbook.

For a CSV, use Excel’s Data > From Text/CSV command when available, select the file, review the preview and delimiter, and load the data. Menu details can vary slightly with updates. Once the data is in Excel, use File > Save As to save a separate .xlsx workbook if you need workbook features. This creates a new workbook; it does not restore formulas or formatting that were never present in the CSV.

Use Excel’s Open and Repair option

If you have a trustworthy file that appears to be a real Excel workbook but will not open normally, try the built-in repair workflow in Excel for Microsoft 365 on Windows. Work on a copy when possible.

  1. Open Excel, then choose File > Open > Browse.
  2. Navigate to and select the workbook. Do not double-click it.
  3. Select the arrow beside the Open button, then choose Open and Repair.
  4. Choose Repair first. If Excel cannot repair the file, repeat the process and choose Extract Data, if that option is offered.

Repair attempts to restore as much of the workbook as Excel can read. Extract Data is a fallback that may recover cell values and formulas, but it may not preserve the workbook’s original layout or features. Review the result carefully, including sheet names, key values, formulas, charts, links, and any macros you expected. Save a recovered result under a new name so the original remains available.

Excel for Mac has its own Open and Repair availability and interface, which can differ by version. If the Windows-specific arrow or option is absent on a Mac, check Excel’s current Help for that version rather than assuming the file is beyond recovery. Excel for the web also has different capabilities from the Windows desktop application; for repair attempts, use the desktop app if it is available.

Other ways to recover a usable copy

If Open and Repair does not work, return to the source before trying more invasive workarounds. Ask the sender to open the original and use File > Save As to create a fresh copy in a suitable format, then send that copy. If the source is a cloud location, check its version history or recycle bin. If the workbook was on a local drive, Windows File History or another backup system may have a previous copy, if one was configured.

For a workbook that opens on another computer or in another spreadsheet application, use that working copy to save a new file in a standard Excel format such as .xlsx. This can help if the issue is specific to an application or local copy, but it does not guarantee that every feature will transfer unchanged. Check formulas, formatting, charts, external links, and macros after conversion. A different application may interpret Excel-specific features differently.

When the file is a text export, inspect a copy with a plain-text editor only if you are comfortable identifying its contents. Readable rows and separators may indicate a text-based export rather than a binary workbook, but text inspection cannot prove that a file is safe or complete. Never upload confidential workbooks to an online “repair” service without checking your organization’s privacy rules and the service’s handling of files.

Choose the right format when saving

Once you can open the data, pick the format for how it will be used. For an ordinary modern workbook, .xlsx is usually the suitable choice. If the workbook needs VBA macros, use .xlsm and keep the macros only when they are necessary and trusted. Saving a macro-enabled workbook as .xlsx removes its VBA macros; Excel normally warns about features that will be lost.

Use .csv when another system specifically requires a text file or when you need to exchange a simple data table. CSV stores one sheet’s displayed data as text, not the full Excel workbook. Dates, leading zeros, long identifiers, and regional separators can be interpreted differently by other programs. For example, a product code such as 00127 may lose its leading zeros if a receiving application treats it as a number. Check the exported file and the importing system’s requirements.

Use .xls only when an older application requires that format, and review Excel’s compatibility warnings before saving. The right extension is the one that accurately describes the contents and meets the recipient’s requirements—not simply the one that makes the warning disappear.

Safety and prevention

Do not enable macros, bypass Protected View, or change Windows security settings just because a workbook shows an error. A damaged workbook and a malicious file are different problems, but an unexpected attachment can be both suspicious and mislabeled. Confirm the sender through a separate trusted channel if the message or file is unexpected.

To reduce future problems, keep a separate backup of important workbooks, let cloud synchronization finish before shutting down, and avoid interrupting a save or transfer. When sending a file, use File > Save As to create the intended format and confirm the resulting extension. If a workbook contains macros or sensitive information, tell the recipient what it needs and share it through an approved channel.

Frequently Asked Questions

Can I fix the error by changing .xlsx to .xls?
No. Renaming changes the label, not the internal format. Use Excel’s Save As command to convert a workbook that opens, or ask for a correctly exported copy. If Excel cannot read the contents, renaming is unlikely to repair them.

Does this message mean my Excel file is permanently corrupted?
No. The extension may be wrong, the download may be incomplete, or the file may be in a different format. Check the source and extension, get a fresh copy, and try Open and Repair on a duplicate before concluding that the data is unrecoverable.

Why does my .xlsx file end in .xlsx.csv?
It may be a CSV file whose full name was hidden or overlooked. In Windows File Explorer, show file name extensions to see the complete name. If it is a CSV, import it as text data and save it as .xlsx only if you need an Excel workbook.

Can Excel repair a corrupted workbook?
Sometimes. In Excel for Microsoft 365 on Windows, use File > Open > Browse, select the file, choose the arrow beside Open, and select Open and Repair. The repair may be incomplete, so inspect and save any recovered data separately.

Is it safe to open a file after this warning?
The warning does not establish whether a file is safe. Treat unexpected attachments cautiously, verify the sender, and do not enable macros or bypass security prompts unless the file and its source are trusted and your organization permits it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.