【问题标题】:Exceeding the row limit of 65536 in Excel in JasperReports在 JasperReports 中超过 Excel 中 65536 的行数限制
【发布时间】:2016-01-15 23:15:15
【问题描述】:

在访问数据库时,我得到了超过 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 对象这里是添加两个 @ 的代码987654326@ 要收集的对象: 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);

谁能指导我如何做到这一点?

【问题讨论】:

  • 为什么不在当前工作表超过 65536 行时创建一个新工作表?
  • 您需要将它们剪切到新的工作表上。
  • 如果您在 jasper 报告中提供示例代码,这对我有很大帮助,提前致谢
  • 一般来说,很多数据不适合人工处理的文档(太大,太慢)。压缩数据:做统计分析、曲线拟合、偏差范围。

标签: java jasper-reports


【解决方案1】:

参考Excel specifications and limits

适用于:Excel 2010

工作表大小为 1,048,576 行 x 16,384 列

推荐

升级到 Excel 2010

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-19
    • 2012-12-24
    • 1970-01-01
    • 1970-01-01
    • 2012-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多