IBM Support

"The file you are trying to open ... different format than specified by the file extension" when running Standard Reports to XLS format, using Excel 2007 (or later)

Troubleshooting


Problem

User runs any Controller standard report (system report). By default this appears in HTML format. User changes output format to "XLS". A dialogue box appears. User has to click "Yes" to open the report in Excel.
Similar messages are seen if doing a similar thing with a Cognos Analytics (or Cognos BI) report (when run outside of the Controller GUI).

Symptom

The exact error will vary, depending on the version of Excel installed on the client device:

Excel 2007
  • Microsoft Office Excel
    The file you are trying to open, 'New+Report[1].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?
    [Yes] [No]

Excel 2010
  • Microsoft Excel
    The file format and extension of 'New+Report[1].xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?
    [Yes] [No]

Excel 2013:

Cause

This behaviour is by design of Cognos BI engine (and Microsoft Excel 2007 onwards).

More Information
The Cognos BI Report Engine (used to generate the Standard Reports in Controller) generates an 'MHT' file (rather than a native XLS file for Excel 2002 outputs). This is done for two reasons:
  1. In order for Cognos BI to be as cross-platform compatible as possible
  2. Also, so that Microsoft Office does not need to be installed on the BI/Report Server (to create the XLS file).
See Technote #1339208 for more information on this topic.

Environment

Client device has Excel 2007 (or later) installed.

Resolving The Problem

This behaviour is by design.

Workaround:
There are several workarounds:
  • Method #1 - Simply click "yes" when prompted (the warning is benign).
  • Method #2 - Modify the client device to automatically say "yes" to this dialogue box

Steps for Method #2:
For full details, see Microsoft article (linked below).
  • However, to summarise (for most customers) the best solution is to create/modify a registry entry "ExtensionHardening" on each client device. For example, if using Excel 2013:


The easiest method to achieve this is to:
1. Logon to the client device as a Windows administrator
2. Double-click on the relevant file (attached to this Technote) relating to their version of Excel:
NOTE: As a precaution, customers should take appropriate actions (for example test inside a 'test environment') first, before modifying their registry.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Component":"Query Studio","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.1","Edition":"Edition Independent","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
28 November 2022

UID

swg21592465