#1 2015-05-26 14:31:29

awilcox
Member
Registered: 2015-03-02

Export to Excel causes a popup warning

Hi,

The Configuration Guide indicates that you can specify the format to export Excel documents - XLS or XLSX, in the excelexport.cf file.

Regardless of which format I specify, the output is always a ".xls" file. When I open it in Excel (I am using Excel 2010), I always get a popup warning that says:

"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? "

This is what my excelexport.cf file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <xls>
      <format>xlsx</format>
      <stream>true</stream>
   </xls>
</configuration>

Does anyone know why this is happening? Is my configuration not correct?

In addition, the generated Excel file contains most of the data, but does not contain any of the images (like a banner at the top of the report, for example). I'm not sure if this is related to the pop-up message issue, or if images are just not included in the Excel file.

Offline

#2 2015-05-26 20:45:59

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Export to Excel causes a popup warning

Hi,

what type of report are you executing here? The configuration in excelexport.cf is only valid for dynamic lists. For Birt or Jasper reports the engine's output generator is used which, in case of Birt, currently runs the XLS emitter. Such a file should, however, be correctly displayed (unless there is a hickup somewhere within Birt or an inconsistency with Microsoft Excel). Does this happen for all reports, or just for a particular one?

Cheers
-Arno

Offline

#3 2015-05-27 16:07:28

awilcox
Member
Registered: 2015-03-02

Re: Export to Excel causes a popup warning

Hi Arno,

I didn't realize excelexport.cf was only for dynamic lists. I made a dynamic list and that one exports to Excel without the popup warning.

This happens for all the Birt reports I have. Even a very basic one without any images, etc. I should add that if I say "yes" to opening the file after the warning, the report does open in Excel but it's definitely missing images and I'm concerned about what else it may have had problems with, given that it gave that warning.

Offline

#4 2015-05-27 16:41:24

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Export to Excel causes a popup warning

What happens if you export to Excel from the Birt designer? Does that give you a clean file?

Offline

#5 2015-05-27 17:19:42

awilcox
Member
Registered: 2015-03-02

Re: Export to Excel causes a popup warning

If I choose "View Report as XLS", it gives the same popup warning that I get in ReportServer. If I say yes, it opens and includes the layout as well as most of the content from the master page, minus the image.

If I choose "View Report as XLSX" it opens without any warnings, but it doesn't include the master page at all, just the layout.

I guess this is consistent with what I see when running from ReportServer, if you are saying that the engine is using the XLS emittter.

Offline

#6 2015-05-27 17:29:58

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Export to Excel causes a popup warning

It looks that way. You can, via scripts, implement custom emitters and add the XLSX emitter (there should be an example in the script guide). I've also added this to the wishlist of features for upcoming versions.

Offline

#7 2015-05-27 17:49:23

awilcox
Member
Registered: 2015-03-02

Re: Export to Excel causes a popup warning

Ok, thanks for the tip re: adding a custom emitter. I'll have a look through the script guide.

Offline

Board footer

Powered by FluxBB