解决方法
JRXlsxExporter类应用于导出为XLSX格式.
使用的样本:
JRMapArrayDataSource dataSource = new JRMapArrayDataSource(data); JasperReport jasperReport = JasperCompileManager.compileReport(reportJRXMLSource); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,params,dataSource); JRXlsxExporter exporter = new JRXlsxExporter(); exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT,jasperPrint); exporter.setParameter(JRXlsExporterParameter.OUTPUT_FILE_NAME,outputFileName); exporter.exportReport();