Jump to content
Changes to the Jaspersoft community edition download ×

Error exporting xls


2004 IR Help

Recommended Posts

By: angeleo - angeleo

Error exporting xls

2005-06-16 01:20

I would like to export my report in xls format. Everything works exporting in pdf format, but when I try to export in xls I get this error:

 

java.lang.NoClassDefFoundError: org/apache/poi/hssf/util/HSSFColor$WHITE

at net.sf.jasperreports.engine.export.JRXlsExporter.(JRXlsExporter.java:173)

.......

 

This is my code:

 

java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream();

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, bytes);

exporter.setParameter(net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

try

{

exporter.exportReport();

}

catch (Exception e)

{

return mapping.findForward("error");

}

 

Does anyone know if is a version problem?

Thanks for helping!

 

 

 

 

By: alanHardwick - alan314

RE: Error exporting xls

2005-06-16 01:32

Looks like you are missing the poi-2.0-final-20040126.jar library from your classpath. (Latest version may have different filename tho..)

 

 

 

 

By: angeleo - angeleo

RE: Error exporting xls

2005-06-16 01:54

Thank you very much! Now everything works! :)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...