Birt - generate xls report programmatically

1.2k Views Asked by At

I am using Birt to generate XLS reports.

While opening the generated XLS file I got the following message

"The file you are trying to open, 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?"

Is there any way to solve this issue?

2

There are 2 best solutions below

1
On

You are trying to open an Excel 2003 report on a computer that has Excel 2010 installed. The message comes from Microsoft, not BIRT.

Other than clicking throught the warning messages there are two options.

  1. Remove Excel 2003 and install Excel 2010 on the computer opening the report
  2. Upgrade to BIRT 4.3 it can export as Excel 2010 (xlxs)
0
On

You are seeing the message because Birt built-in emitter does not output Excel format files, it outputs files in an XML format that Excel can understand, as a result newer versions of Excel complain whenever the files are opened.

To solve this you can use other emitters such as SpudSoft (this emitter is planned to replace the inbox emitter for BIRT 4.3)