JRXlsExporter - Invalid row number (65536) outside allowable range

0

I was trying to write an excel sheet and then download the same using byteArray. I have almost 1L records and is getting the following error.

Invalid row number (65536) outside allowable range (0..65535)

  try    {      List<byte[]> byteArray = new ArrayList();      for (ReportGen reportGen : reportGenOutputs)      {        JasperPrint jasperPrint = (JasperPrint)reportGen.getContent();        ByteArrayOutputStream outStr = new ByteArrayOutputStream();                JRXlsExporter XLSExp = new JRXlsExporter();        XLSExp.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);        XLSExp.setParameter(JRExporterParameter.OUTPUT_STREAM, outStr);        XLSExp.setParameter(JRXlsAbstractExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);        XLSExp.exportReport();                byteArray.add(outStr.toByteArray());      }      return byteArray;    }    catch (Exception e)    {     // Exception goes here    }

Invalid row number (65536) outside allowable range (0..65535)Invalid row number (65536) outside allowable range (0..65535)

tailorbird.restless's picture
Joined: Mar 18 2014 - 11:16pm
Last seen: 5 years 7 months ago

1 Answer:

0

Seems like something in the following thread. Which version of JasperReports are you using?

http://stackoverflow.com/questions/10753562/invalid-row-number-65536-out...

hozawa's picture
54300
Joined: Apr 24 2010 - 4:31pm
Last seen: 6 months 1 day ago

Version : jasperreports-3.7.6
The above link seems not using the JasperReports but the Apache POI.

tailorbird.restless - 5 years 8 months ago

Is this issue got resolved? I am facing this same issue with jasperreports-5.5.1 version.
Nevermind,it seems not an issue with Jasper reports.
Changed JRXlsExporter to JRXlsxExporter to generate XLSX format instead of XLS.

vsairam28 - 4 years 5 months ago
Feedback