Jasper报告Excel输出

Nay*_*ayn 10 excel jasper-reports

我需要使用Jasperreports以Excel格式生成报告.我正在使用iReports 3.7.0除了空单元格的大小外,生成的报告没有任何问题.

替代文字

有人可以告诉我们如何避免突出显示的细胞被放大.正常细胞也比它们的含量稍大.

小智 14

另外,当你需要将Japser导出到XLS时,我会说坚持基础知识.我的意思是没有图形,等等.

上述解决方案适用于从iReport生成XLS.

如果你想通过程序生成XLS; 使用以下代码

exporter = new JRXlsExporter();
exporter.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE);
exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.FALSE);
exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.TRUE);
Run Code Online (Sandbox Code Playgroud)


Nay*_*ayn 9

我得到了答案.想与他人分享.以下是设置.

替代文字