Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

When you open a file in Excel, you get an message that the file name extension doesn't match the actual file format. For example, the file has an .xlsx file name extension but it's really a text file and should have a .txt file name extension.

Notes: 

  • Excel for the web won't edit files that aren't really in Excel format, so it displays a different message in this situation.

  • When you try to open such a file in Excel for the web, it copies the file contents to a new Excel file in the same file location, opens that copy in View Mode, and offers the choice to edit the workbook.

  • If you choose to edit, your desktop Excel app opens the new file, and then displays the file name extension message.

Before you click Yes to open the file, you may want to consider the reasons why the file might have an incorrect file name extension.

The file might have been:

  • Renamed inadvertently    If you or someone you know renamed the file by accident with an incorrect file name extension, you can safely open the file. Then, save the file in the file format with the appropriate file name extension.

  • Renamed intentionally    If you or someone you know purposely renamed the file with a different extension to ensure that Excel will recognize the file name extension, you can open the file. However, as a best practice, you should save the file with a file name extension that reflects its actual file format.

As a first step, however, it's important to decide whether or not you trust the source of the file. If you can't verify that the originator of the file is a trusted source, you shouldn't open the file. A hacker (malicious user) might have renamed the file with the intent of misleading you to open it in Excel.

An issue with a file name extension might occur when a workbook that you are trying to open is unreadable and the contents no longer resemble the expected file format. If a workbook has become corrupted, you can try to repair it before you open it. For information about how to recover a corrupted workbook, see Repair a corrupted workbook.

If you see this message when you try to open a workbook that a trusted source sent to you in an email, you can't open it from your email program. Ask the person who sent it to you to resend the workbook in the Excel Binary Workbook (*.xlsb) or Excel 97-2003 Workbook (*.xls) file format. Alternatively, you can save the attached workbook on your computer, and then open it in Excel.

Additional information

Change the group policy controlling the message display

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×