Excel File Format or File Extension Not Valid? Fixes

How-to basics · Updated November 18, 2026

If Excel says the file format or file extension is not valid, it usually means the workbook’s contents do not match its extension, the file is incomplete, or the file is damaged. Check the file’s source and name first, then try Excel’s Open and Repair option on a copy; simply changing the extension does not convert a file.

What the error means

Excel uses a file’s internal structure as well as its filename extension to decide how to open it. The extension is the part after the final period, such as .xlsx or .xls. If a file named budget.xlsx contains data in a different format—or if its contents are incomplete—Excel may not be able to read it as an Excel workbook and can show this message.

The message is a description of the problem, not a diagnosis of the exact cause. It does not necessarily mean the workbook is permanently lost. A mistaken extension may be easy to correct once you know the real format; a partially downloaded or damaged workbook may need to be downloaded again or repaired. In other cases, the file may not be an Excel workbook at all, despite its name.

It is also different from a Protected View warning, a request for a password, or a message that a file is locked for editing. Those messages generally indicate a security, access, or compatibility issue. The format-or-extension warning points first to whether Excel can recognize and read the file’s contents.

How Excel file formats and extensions work

An extension is a useful clue, but it is not a reliable way to transform data. For example, changing report.csv to report.xlsx only changes the name; it does not turn the comma-separated text into a structured Excel workbook. A genuine .xlsx workbook uses an Office Open XML package containing multiple related parts, while older .xls workbooks use a different binary format.

Common Excel extensions include:

  • .xlsx: The standard XML-based Excel workbook format. It does not store VBA macros.
  • .xlsm: An XML-based workbook format that can contain VBA macros. A macro-enabled file renamed .xlsx may lose the appropriate extension and cause confusion; do not enable macros unless the source is trusted.
  • .xls: The older Excel 97–2003 workbook format. Newer Excel versions can open many .xls files, though some newer features may not be retained if you save back to that format.
  • .xlsb: An Excel binary workbook format. It can contain macros, so treat files from unknown sources cautiously.
  • .csv: Plain text data arranged in rows and columns. It does not preserve workbook features such as multiple sheets, formulas as formulas, or cell formatting.

Excel can also work with other formats, including OpenDocument spreadsheets, but support and feature preservation vary. A file produced by another program may have an extension that suggests compatibility while containing a different or imperfectly supported structure.

Start with these checks

Before attempting recovery, preserve the original. Make a copy and troubleshoot that copy so that a repair attempt or accidental rename cannot overwrite the only version. Then check where the file came from and whether its name and size make sense.

  1. Check the file size. In File Explorer, right-click the file and choose Properties. A zero-byte file, or one far smaller than expected, may be an incomplete download or transfer. A plausible size does not prove the workbook is healthy, but it can reveal an obvious problem.
  2. Download or copy it again. If it came from a website, email attachment, shared drive, or cloud folder, obtain a fresh copy from the original source. Wait for a cloud-sync service to finish before opening the file. If possible, compare the replacement’s size with the original.
  3. Check the complete filename. Windows may hide extensions by default, making a name such as report.xlsx.csv look like report.xlsx. In Windows 11 File Explorer, select View > Show > File name extensions. In Windows 10, use the View tab and select File name extensions.
  4. Move a copy to a local folder. A file on a network share, removable drive, or synchronizing folder may be unavailable or only partly copied. Copy it to a folder on the computer, such as Documents, and try opening that copy.
  5. Confirm the sender’s intended format. Ask whether the file was exported as an Excel workbook, CSV, PDF, or another type. A sender may have changed the filename without exporting it to the format the extension implies.

Check whether the extension matches the actual file

Only rename an extension when you have a good reason to know the file’s true format—for example, the sender confirms that a workbook was accidentally named .csv instead of .xlsx. On the copy, show extensions in File Explorer, rename the suffix, and accept Windows’ warning only if you are confident about the change. Then try opening the renamed copy in Excel.

Do not cycle through extensions such as .xlsx, .xls, and .xlsm hoping one will work. These are different formats, not alternative labels for the same contents. Renaming an actual CSV to .xlsx will not add worksheets or formulas, and renaming a damaged workbook will not repair it. If you cannot establish the actual format, request a fresh export rather than guessing.

For a file from a trusted source, an archive utility may sometimes help identify an XML-based workbook: .xlsx and .xlsm files are package files that can often be inspected like ZIP archives. A readable package is not proof that every workbook part is valid, and editing or rearranging its contents can make recovery harder. Do not use this approach on the only copy, and do not upload confidential workbooks to an online file-inspection or conversion service.

Use Open and Repair in Excel for Windows

If the extension appears correct and the file is a workbook, Microsoft 365 Excel for Windows includes an Open and Repair command. It may recover a damaged workbook, but it cannot restore data that was never fully downloaded or repair every kind of corruption.

  1. Make a copy of the file and start Excel.
  2. Select File > Open > Browse. In the file picker, select the copy; do not double-click it.
  3. Select the arrow beside the Open button, then choose Open and Repair.
  4. If prompted, choose Repair first. If that does not work, repeat the process and choose Extract Data if Excel offers it.
  5. If Excel opens the workbook, review the sheets, formulas, charts, and formatting before saving. Save recovered content under a new name and keep the original unchanged.

Repair and data extraction can produce different results. Repair attempts to restore the workbook structure; extracting data may prioritize recovering values and formulas while losing formatting or other workbook features. Check important totals and formulas against a reliable source rather than assuming every recovered cell is correct. Menu labels and recovery options can differ in Excel for Mac and Excel for the web; the Windows steps above do not describe those interfaces.

Other causes and what to try

A workbook can be rejected even when its name looks ordinary. It might have been interrupted during saving, transferred incompletely, exported incorrectly by another application, or altered by a storage or synchronization problem. A file may also be a different type—such as a PDF or a compressed download—that someone renamed with an Excel extension.

Try opening a separate, known-good workbook in Excel. If other workbooks open normally, the problem is more likely specific to the file or its source. If Excel has trouble with several unrelated workbooks, restart the computer and try again. You can also use Windows’ installed-app settings to run an Office repair if the problem appears to affect Excel broadly; repair choices depend on how Microsoft 365 was installed. Avoid changing registry settings based on generic online fixes, since that can introduce new problems without correcting a damaged file.

If the workbook opens on another computer or in another supported spreadsheet application, save a fresh copy from that application in an Excel format and test the copy in Excel. Different programs may interpret features differently, so inspect formulas, charts, formatting, and macros before relying on the converted version. Do not enable macros simply to get a file to open.

Recovery options and data safety

If repair fails, go back to the source before trying more invasive methods. Ask the sender to export or save the workbook again, or restore an earlier version from the organization’s backup or version-history system if one is available. Version history is only useful when the file was stored in a service or location that retains prior versions and the feature was enabled.

For a CSV or other plain-text export, Excel may still be able to import the data even if the filename is wrong. Use File > Open to select the file, or ask the sender for a new export. Importing text can require checking delimiters and character encoding; opening a CSV directly may also interpret values such as dates or leading zeros differently than intended. A CSV cannot recreate multiple sheets, cell styles, charts, or formulas that were not included in the text file.

Be careful with third-party repair tools and online converters. A workbook can contain payroll details, customer records, or confidential business information. Uploading it to a public service may disclose that information, and a repair tool cannot guarantee a complete recovery. Prefer a trusted local backup or your organization’s IT support for sensitive files. Keep an untouched original until you have verified a recovered copy.

How to prevent the error

Prevention is mostly about reliable saving and transfer. Save the workbook from Excel using File > Save As when you need to choose a format, and select the format that matches how the file will be used. For example, choose .xlsx for a standard workbook without VBA macros and .xlsm when a workbook must retain VBA macros. Excel may warn when a selected format cannot preserve all workbook features; read that warning before continuing.

  • Let downloads, email attachments, and cloud synchronization finish before opening a file.
  • Use a clear filename and avoid manually changing the extension after export.
  • Keep a second copy of important workbooks, preferably in a managed backup or version-history system.
  • When sending a workbook, tell the recipient whether it contains macros and what format you saved it in.
  • Open an exported file once and check that key sheets and data are present before sharing it widely.

Frequently Asked Questions

Does changing .xlsx to .xls fix the error?

Usually not. Changing the suffix changes the filename, not the workbook’s internal format. Rename a file only when you have confirmed that the contents are already in the format indicated by the new extension.

Can I recover a workbook that Excel will not open?

Sometimes. First get a complete copy from the source, then try Open and Repair in Excel for Windows. If repair fails, try Extract Data if offered, or seek an earlier version or backup. Recovery is not guaranteed, so keep the original.

Why does a file called .xlsx turn out to be a CSV?

The file may have been renamed instead of exported, or Windows may be hiding an additional extension. Show file name extensions in File Explorer and ask the sender what format was actually created.

Will converting the file to CSV preserve my workbook?

No. CSV is a text format for tabular data, not a complete Excel workbook. It does not preserve multiple sheets, cell formatting, charts, or formulas as working formulas, so keep a workbook copy if those features matter.

Is it safe to use an online Excel repair site?

Only consider one if you are permitted to share the workbook and understand the service’s privacy terms. For confidential files, use a local copy, a trusted backup, or your organization’s IT support instead.

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.