Jump to content
Changes to the Jaspersoft community edition download ×

How to export report to xls format using APIs?


chengfan

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

there exists also exporter for xls and rtf and so on. for xls an example:

 

Code:

JExcelApiExporter xlsExporter = new JExcelApiExporter();
xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
xlsExporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);
xlsExporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);
xlsExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);
xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,"report.xls");
xlsExporter.exportReport();

 

thats only a fragment, just try it out, there are some parameter, which can be set like this.

 

Post edited by: wegnerk, at: 2006/12/05 14:56

Post edited by: wegnerk, at: 2006/12/05 14:56

Link to comment
Share on other sites

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...