#1 2016-03-22 10:27:39

brainchutney
Member
Registered: 2016-03-22

Exporting Jasper Report to Excel yields 0 kB file

Hi,

I was unable to export my jasper report to Excel because it was throwing an exception with root casue : org.apache.poi.hssf.usermodel.HSSFCellStyle.setShrinkToFit(Z)V

I replaced the following JARs in the POI jars in webapps/rs/WEB-INF/lib

poi-3.9.jar
poi-ooxml-3.9.jar
poi-scratchpad-3.9.jar
poi-ooxml-schemas-3.9.jar

with the latest ones available online (3.14-20160307)

The exception has gone and RS tries to export to an xls file...BUT the size is 0 kb and it doesnt capture any data...it basically gives me a blank xls file.  sad

HELP.

Thank you.

Offline

#2 2016-03-22 12:25:09

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Exporting Jasper Report to Excel yields 0 kB file

Hi,

I am afraid simply replacing libraries within ReportServer will usually fail because of the many interdependencies between the various libraries (e.g., Jasper and Birt both require poi and usually not in the same version).

The new RS version is around the corner and there we have upgraded POI to 3.11, so I hope this resolves the issue for you.

If not, what would help is if you could produce a minimal example that has this problem that you could post here.

Best regards,
Arno

Offline

#3 2016-03-22 13:02:53

brainchutney
Member
Registered: 2016-03-22

Re: Exporting Jasper Report to Excel yields 0 kB file

Hi Arno,

I'm not sure what you mean by "produce a minimal example that has this problem"...

I designed a Jasper report and deployed it on RS. PDF HTML and RTF work fine. But when i click on the excel option.. Libre Office Calc kicks off and tries to open a blank xls file...
The Excel export option works perfectly when I try it in JasperSoft Studio (where I'm designing these reports). After some reading up online...what i could figure out was the poi was causing this issue.

I can try POI ver 3.11 and check if anything is resolved.

When you say "around the corner" do you have a ballpark date in mind ?

Thanks smile

Offline

#4 2016-03-23 11:28:12

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Exporting Jasper Report to Excel yields 0 kB file

Hi,

it will be out soon big_smile

What I meant by "minimal example" was a jasper report that is as simple as possible and that you could post here (or send via email) so that we can reproduce the error. I am not sure if upgrading to POI 3.11 will work on RS 2.2.2 because there you have different versions of jasper and birt. But you can of course give it a try :-)

Cheers,
Arno

Offline

Board footer

Powered by FluxBB