Import a chart into XLS file

hai,

i create a chart and some text data with a jasperreport, and i would like to export that report into a xls file,

file xls is create but a chart is not exist in xls file.

How to import a report that contain a chart into xls ?

this my code :

JRXlsExporter exporterXLS = new JRXlsExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_FILE_NAME, "c:/".concat(strSavedFileName).concat(".xls"));
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE, Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterXLS.exportReport();
andysusanto's picture
Joined: Aug 21 2006 - 4:57pm
Last seen: 8 years 8 months ago

2 Answers:

JRXlsExporter does not export images because of POI-HSSF limitations.

You can try the JExcelApiExporter exporter, which is able to export images (and charts are exported as images).

Regards,
Lucian
lucianc's picture
75913
Joined: Jul 17 2006 - 1:10am
Last seen: 25 min 6 sec ago
Worked fine, many thanks:)
gr4nt4's picture
140
Joined: May 24 2007 - 2:36am
Last seen: 16 years 1 week ago
Feedback
randomness