You are on page 1of 4

When you open a file in Excel 2007, you

receive a warning that the file format differs


from the format that the file name extension
specifies
Article ID: 948615 - View products that this article applies to.
Important This article contains information about how to modify the registry. Make sure that
you back up the registry before you modify it. Make sure that you know how to restore the
registry if a problem occurs. For more information about how to back up, restore, and modify the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Expand all | Collapse all

SYMPTOMS
When you open a file in Microsoft Office Excel 2007 that contains content that does not match
the files extension, you receive the following warning message:
The file you are trying to open, 'name.ext', 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?
Note The name placeholder is the file name and the ext placeholder is the file name extension of
the file that you open in Excel 2007.
Back to the top | Give Feedback

CAUSE
The warning message is a user-notification function that was added to Excel 2007. The warning
message can help prevent unexpected problems that might occur because of possible
incompatibility between the actual content of the file and the file name extension.
Back to the top | Give Feedback

RESOLUTION
If you trust the source of the file, click Yes to the warning message.

If you have to control the user-notification function, use one of the following methods.

Important These steps may increase your security risk. These steps may also make the computer
or the network more vulnerable to attack by malicious users or by malicious software such as
viruses. We recommend the process that this article describes to enable programs to operate as
they are designed to or to implement specific program capabilities. Before you make these
changes, we recommend that you evaluate the risks that are associated with implementing this
process in your particular environment. If you decide to implement this process, take any
appropriate additional steps to help protect the system. We recommend that you use this process
only if you really require this process.

By default, a user can decide whether to open the file when the warning message is displayed.
However, the user-notification function can be set to any of the following levels by using a
Group Policy setting or by using Registry Editor:

Display the warning message, and do not open the file.


Display the warning message, and let the user decide whether to open the file
(This is the default setting).
Open the file, and do not display the warning message.

Use a Group Policy setting

1. Download the 2007 Office system Administrative Template files (ADM, ADMX,
ADML) and Office Customization Tool from the following Microsoft Download
Center Web site:

http://www.microsoft.com/downloads/thankyou.aspx?familyId=92d8519a-e143-
4aee-8f7a-e4bbaeba13e7

2. Extract the administrative template files to a folder. To do this, follow these steps:
a. Double-click the AdminTemplates.exe file.
b. Accept the Microsoft Software License Terms, and then click Continue.
c. Select a folder in which to save the extracted files, and then click OK.
d. Click OK after the files have been extracted successfully.
3. Open the Group Policy Object Editor.

For more information about how to open the Group Policy Object Editor, visit the
following Microsoft TechNet Web site:

http://technet2.microsoft.com/windowsserver/en/library/03ec122f-fc65-496e-
ad0d-4fd22a96a4bb1033.mspx

4. Expand User Configuration.


5. Right-click Administrative Templates, and then click Add/Remove Templates.
6. In the Add/Remove Templates dialog box, click Add.
7. Browse to the folder that contains the Administrative Templates that you extracted
in step 2c.
8. Click the Excel12.adm file, and then click Open. The Excel12.adm file is located
in the following folder to which you extracted the Administrative Templates in
step 2c:

\ADM\languageID
Note The English language administrative template files are located in the EN-US
languageID folder.

9. Click Close to close the Add/Remove Templates dialog box.


10. Expand Administrative Templates, expand Microsoft Office Excel 2007,
expand Excel Options, and then click Security.
11. On the Extended tab, double-click Force file extension to match file type under
Setting.
12. On the Setting tab, click Enabled, click one of the following in the Force file
extension to match file type drop-down list, and then click OK:
o Allow different
o Allow different, but warn
o Always match file type
13. Close the Group Policy Object Editor.

Use Registry Editor

Warning Serious problems might occur if you modify the registry incorrectly by using Registry
Editor or by using another method. These problems might require that you reinstall the operating
system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at
your own risk.

1. Exit Excel 2007.


2. Start Registry Editor.
o In Windows Vista, click Start

, type regedit in the Start Search box, and then press ENTER.

If you are prompted for an administrator password or for a confirmation,


type the password, or click Continue.

o In Windows XP, click Start, click Run, type regedit, and then click OK.
3. Locate and then click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security

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 the value data, and then click OK.
The following list contains the value data settings that are appropriate for the
ExtensionHardening setting:
o 0: Do not check the file name extension and the file type, and bypass the
function of the warning message.
o 1: Check the file name extension and the file type. If they do not match,
display the warning message.
o 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. We
do not recommend bypassing this function.

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

You might also like