Excel Says File Format and Extension Do Not Match, Fix?
Resolved File Viewers
LH
Laura Hayes
November 28, 2026
4 replies
77 views
Reviewed by moderators
3 participants

Excel says the file format and extension of my file do not match. If I click Yes the sheet opens empty. What does that mean and can I fix it?

Accepted answer
Marked as the solution to this question

The extension in the file name says one format while the file content holds another. Microsoft gives an example, a file named with .xlsx that is really a text file. Many web exports save HTML or CSV data with an .xls name, which triggers the same warning.

Try these fixes in order. Work on a copy of the file.

1. Open the file in a text editor like Notepad. If you see readable text or HTML tags, the file is not a real workbook.
2. Rename the copy to match the content, for example .csv or .html, and open it in Excel.
3. Open Excel, select File, Open, select the file, click the arrow next to Open and select Open and Repair.
4. Right click the file, select Properties and select Unblock if you see that option.
5. Download the file again from the source. A broken download looks the same.

Renaming only changes the label and not the content, so do not rename the original.

Notepad shows strange symbols and the file starts with PK.

PK at the start means a ZIP container, which is how XLSX and DOCX files are built. So the file is probably a real Office file with a wrong extension or a damaged one. Make a copy and try .xlsx, .docx and .pptx names one after another, then use Open and Repair. If it still fails, rename the copy to .zip, open it and check for an xl folder. An xl folder confirms an Excel workbook, and you can copy the sheet XML files out of it.

Copy opened as a real xlsx. Thanks.