在点击数据库时,我收到了超过80000条记录。我使用JasperReports将它们导出到Excel中,但Excel可以保持行限制为65536.
如何在单个报告中导出所有记录,或者如何在超过65536时创建新的Excel?我经历了这个链接,但我没有得到的东西: Is it possible to see more than 65536 rows in Excel 2007?
这是主要问题:列表对象包含80000多条记录。如果超过65536行,如何将列表对象分成两个JasperPrint对象?
如果我能够将列表对象划分为两个JasperPrint对象,那么我们可以愉快地将两个JasperPrint
对象添加到一个集合中然后我们可以将集合对象添加到JRExporter
对象这里是代码向集合中添加两个JasperPrint
个对象:
How do you export a JasperReport to an Excel file with multiple worksheets?
到目前为止,这是我的代码:
JRDataSource datasource = new JRBeanCollectionDataSource(
confirmList);
JasperReport jasperReport = (JasperReport) JRLoader
.loadObject(reportPath);
Map parameters = new HashMap();
parameters.put("title", "Reports for "
+ "confirmed");
JasperPrint jasperPrint = JasperFillManager.fillReport(
jasperReport, parameters, datasource);
任何人都可以指导我如何做到这一点吗?
答案 0 :(得分:1)