Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an application that exports data using the older Office XP/2003 XML Spreadsheet format. These files are saved with a .xls extension so that they can be launched directly, without having to know the installation of Excel.

This has worked extremely well for us up until now. However, we have just recently upgraded to Office 2007, and when we launch these .xls files directly, Excel 2007 shows a warning message:

The file you are trying to open, 'file.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

I have already tried adding the location of the file to the "Trusted Locations" in Excel, but the warning message still comes.

Is there any way to suppress this message?

share|improve this question
up vote 4 down vote accepted

1) Exit Excel 2007.
2) Start Registry Editor.
3) Locate and then click the following registry subkey:


4) On the Edit menu, point to New, and then click DWORD Value.
5) Type ExtensionHardening, and then press ENTER.
6) Right-click ExtensionHardening, and then click Modify.
7) In the Value data box, type 0, and then click OK.

The following list contains the value data settings that are appropriate for the ExtensionHardening setting:

0: Do not check the file name extension and the file type, and bypass the function of the warning message.
1: Check the file name extension and the file type. If they do not match, display the warning message.
2: Check the file name extension and the file type. If they do not match, do not open the file.

Note: The default value data is 1. When the value data is set to 1, the behavior becomes the same as when no registry value is set. When the value data is set to 0, the file name extension and the file content are not checked in all situations. It is not recommended bypassing this function.

8) On the File menu, click Exit to exit Registry Editor.

share|improve this answer
For those who can't find Registry Editor - it's regedit.exe – grawity Nov 5 '09 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .