The “File format and document extension do not match” error message appear when a user tries to open certain files in Microsoft Office, especially Microsoft Excel. All previously saved data is deleted when the “Yes” button is pressed.
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.
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
- Some users have solved the problem by manually changing the file extension in various standard Excel formats until they find the right format. Click the File Explorer button on the Windows 10 taskbar.
- On the View tab, select the file name extensions.
- Open the folder containing the Excel file where the error occurred.
- Right-click on the file and select Rename.
- Then change the extension at the end of the file to. xls, .xlsx, or .xlsm. Try opening the Excel spreadsheet using each of these alternative file formats.
Select the Open and Repair option
- The Excel file may be corrupted, and you can restore it using the Open and Repair option. First, open the Excel window.
- Select the File tab.
- Click Open to open the window directly below it.
- Select the file where the problem occurred.
- Then click on the Open arrow. Select the Open and Restore option.
- Select the Restore option.
- If the Restore option does not solve the problem, repeat the above steps and click Extract Data. You can then click Convert to Values to extract the data from the worksheet.
Unlocking the Excel file
- Some users have confirmed that they have fixed the “File format does not match the extension” error by unblocking the file. To do this, open File Explorer.
- Open the path to the folder containing the Excel file you want to fix.
- Right-click on the Excel file and select the Properties option.
- In this window, select the General tab.
- Select the unlock option. Please note that this option is only visible for files that come from another source, such as email attachments.
- Click the Apply button.
- Click Finish to close the window.
Deactivating the protected view
- Deactivating the protected view in Excel can also fix the “File format does not match” error. In Excel, click the File tab.
- Click on the “Options” button to open a window like the one shown below.
- Click on the “Trust Center” tab on the left side of the window.
- Click the “Trust Center Settings” button.
- Then click the “Protected View” button in the Trust Center window.
- From here, uncheck all three settings to activate the protected view.
- In the Trust Center window, click the OK option.
- Then click OK again to exit the other window.
Remove the warning message
If none of the above methods were able to fix the “File format and file extension do not match” error message, and you don’t want to update your Office installation to a newer version that fixes the problem, you also have the option of creating a registry key that you can use to remove the warning message entirely.
But before you do this, keep in mind that it could leave your system vulnerable to future exploits. However, if the computer in question is part of a corporate network, you should not be affected in any way.
- Press Windows + R to open the “Run” dialog box. Enter “regedit” in the “Run” field and press “Enter” to open the registry editor. When prompted for UAC (User Account Control), click “Yes” to grant administrator privileges.
- While in the Registry Editor, use the right pane to navigate to the next location:
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.
- After successfully navigating to the desired location, switch to the right pane, right-click on the empty location, and select NEW -> Word value (32-bit).
- After creating the new Dword value, name it ExtensionHardening. Then double-click it and set the base to hexadecimal and the value to 0 before clicking next.
- After making the changes, close the Registry Editor and restart your computer.
The next time you start the system, the same error message should not occur again.
Frequently Asked Questions
- 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.
- 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.
- 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.
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.