我们使用的是jasper版本6.我们可以导出到EXCEL(XLS和XLSX)。Jasper Report如何使用RTL工作表创建excel xlsx文件?
下面的代码适用于XLS并创建一个RTL表:
exporter = new JRXlsExporter();
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(out));
SimpleXlsReportConfiguration xlsReportConfig = new SimpleXlsReportConfiguration();
xlsReportConfig.setSheetDirection(RunDirectionEnum.RTL);
exporter.setConfiguration(xlsReportConfig);
然而,当我尝试同样的代码,以使一个XLSX文件纸张方向不会改变RTL:
exporter = new JRXlsxExporter();
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(out));
SimpleXlsxReportConfiguration xlsxReportConfiguration = new SimpleXlsxReportConfiguration();
xlsxReportConfiguration.setSheetDirection(RunDirectionEnum.RTL);
exporter.setConfiguration(xlsxReportConfiguration);
这是碧玉报告,您已经厌倦了?发现同样的bug的确切版本为V 6.1.1 –