Narendra
Narendra

Reputation: 137

Exceeding the row limit of 65536 in Excel in JasperReports

While hitting the database I am getting more than 80000 records. I am using JasperReports to export those into an Excel, but an Excel can hold a row limit of 65536.

How can I export all records in single report or how can I create a new excel when ever it exceeds 65536? I gone through this link but I am not getting things: Is it possible to see more than 65536 rows in Excel 2007?.

Here is the main problem: list object contains more than 80000 records. How can I divide the list object into two JasperPrint objects when ever it exceed the 65536 rows?

If i am able to divide the list object into two JasperPrint objects then we can happily add the two JasperPrint objects to one collection then we can add the collection object to JRExporter object here is the code to add two JasperPrint objects to collection: How do you export a JasperReport to an Excel file with multiple worksheets?.

This is my code so far:

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);

Can anyone please guide me how to do this?

Upvotes: 0

Views: 4953

Answers (1)

DavidPostill
DavidPostill

Reputation: 7921

Reference Excel specifications and limits

Applies to: Excel 2010

Worksheet size 1,048,576 rows by 16,384 columns

Recommendation:

Upgrade to Excel 2010

Upvotes: 1

Related Questions