- The “File format and document extension do not match” error message appears when a user tries to open certain files in Microsoft Office, especially Microsoft Excel.
- In most cases, this problem occurs because the Excel file you are trying to open has a different file extension than the one you are plugging in.
- If this scenario applies, you can solve the problem by manually changing the extension to the correct one.
If a user presses the “Yes” button, all previously saved data will be deleted, resulting in the “File format and document extension do not match” error message.
What is the reason for the “File format and extension do not match” error?
Incorrect file extension: In most cases, this problem occurs because the Excel file you are trying to open has a different file extension than the one you are currently plugging in. This can be done automatically after converting the file or manually after user intervention. If this scenario applies, you can solve the problem by manually changing the extension to the correct one.
CSV files are a main reason Excel complains about that. XLS files that are just renamed to XLSX (without proper conversion) are also prone to this problem. Use 7-ZIP (or any other compression tool) to open one of the offending XLSX files. They are simply glorified ZIP files, and they should open just fine. They may be renamed XLS files without conversion, explaining why Excel isn’t happy with them.
The Excel file is locked: If you received an Excel file after downloading it from an email attachment, there is a good chance that the file is locked in the properties. Many email providers today automatically block it for security reasons. In this case, you can automatically resolve the problem by unlocking the file from the Properties menu.
The file is not compatible with Excel: It turns out that this problem can also occur because the file in which the problem occurs is not compatible with Excel. You can use another equivalent third-party tool, such as OpenOffice Calc (part of the OpenOffice suite), to solve this problem.
Protected Views Enabled: There is also a new security option that can prevent the main Excel application from opening certain files that we have received as email attachments. In this case, the problem can be solved by going into Excel’s settings and disabling “Protected Views” in the Trust Center menu.
The message won’t clear: If the message bothers you, but you don’t want to update your Office build to a newer version that fixes the problem, a viable way to make sure the error doesn’t occur again is to remove the warning message by using the registry editor to create an “ExtensionHardening” value.
What should I do if the Excel file format and extension don’t match?
Change the folder extension
- In Windows 10, click the File Explorer button on the taskbar to open the File Explorer menu. Click the File Explorer button until you find the right format for the file extension.
- The file extension can be selected on the View tab.
- The Excel file where the error occurred can be found in the folder containing the Excel file.
- Choosing Rename from the right-click menu will rename the file.
- Use one of these alternative file formats to open the Excel spreadsheet. Change the file extension to xls, .xlsx, or .xlsm.
Select the Open and Repair option
- When you open Excel, you will see an option to “Open and Repair” the file. Using this option, you can recover corrupted Excel files.
- File is the tab you want to select.
- Immediately below the window, click Open.
- The problem can be found in the selected file.
- You can then select the option to Open and Restore by clicking the Open arrow.
- You can restore your data by selecting Restore.
- To extract data from the worksheet, click Extract Data and then Convert to Values. This will help resolve the problem.
Unlocking the Excel file
- File Explorer can be opened in order to unblock the file if the “File format does not match the extension” error occurs.
- The Excel file you wish to fix can be found in a folder that you open.
- Choose Properties from the right-click menu when you are viewing an Excel file.
- The General tab will appear in this window.
- Unlocking files from other sources, such as email attachments, is only available for files that come from other sources.
- The Apply button will appear.
- When you are finished, click Finish.
Deactivating the protected view
- In Excel, click the File tab and then click the Protected View tab. This will remove the error “File format does not match”.
- A window similar to the one below will open when you click on the “Options” button.
- On the left hand side of the window, click the “Trust Center” tab.
- Go to “Trust Center Settings” and click it.
- When you arrive at the Trust Center window, click the “Protected View” button.
- The protected view can be activated by unchecking all three settings.
- You can now click OK in the Trust Center window.
- After you have clicked OK in the other window, you should click it again to exit.
Remove the warning message
The error message “File format and file extension don’t match” cannot be fixed using any of the above methods, so you can also create a registry key that will remove the warning message if you do not wish to update your Office installation to a newer version that fixes it.
Cannot Open Excel File
Using the right mouse button, select the damaged Excel file, then select Properties – Previous Version. A list of previous versions will appear; click Restore to restore the previous version.
Your Excel might display the above message if it is version 2007 or later.
It is important to note, however, that doing so might leave your system vulnerable to future attacks. On the other hand, if the computer is part of a company network, you should not be affected.
- If prompted for UAC (User Account Control), click “Yes” to allow the registry editor to run. To open the registry editor, press Windows + R and enter “regedit” in the “Run” field.
- The next location can be navigated using the right pane in the Registry Editor:
Note: You can also paste the location directly into the navigation bar and click on the navigation bar for immediate access. Please also note that X is only a location – replace it with the current version of your Office installation.
- Right-click on the empty location in the right pane, and select NEW – Word value (32-bit) once you have navigated to the desired location.
- When you have created the new Dword value, name it ExtensionHardening with the hexadecimal base and 0 value. You can now click Next.
- Restart your computer after closing Registry Editor.
When the system is restarted the following time, you should not see the same error message.
Frequently Asked Questions
How do I change the file extension and not match it in Excel?
- Change the file extension.
- Select the Open and repair option.
- Unlock the Excel file.
- Turn off the protected view.
- Open the file in LibreOffice Calc.
How do I fix a file extension error?
- First, click Start -> My Computer -> Tools and choose Folder Options or Organize in Windows 7 and Vista.
- Then click Folder Options and Search Options.
- Then go to the View tab -> and uncheck "Hide extensions for known file types" -> click OK.
How do I fix a file error in Excel?
- Click the Open button on the File menu.
- And select the Excel file that is causing the problem from the list.
- Now select "Open and Repair" from the drop-down list on the "Open" tab.
- Click the "Repair" button to repair the Excel file.
How do I open a file with the wrong extension?
If the file extension is incorrect, it may not open in the correct application. Correct the file extension so that the file opens in the application of your choice when you double-click it. From the "Start" menu, go to "Preferences". If you prefer, you can use "Win + I" as a keyboard shortcut.
Mark Ginter is a tech blogger with a passion for all things gadgets and gizmos. A self-proclaimed "geek", Mark has been blogging about technology for over 15 years. His blog, techquack.com, covers a wide range of topics including new product releases, industry news, and tips and tricks for getting the most out of your devices. If you're looking for someone who can keep you up-to-date with all the latest tech news and developments, then be sure to follow him over at Microsoft.