0

ZK 7.0.4 Excel Exporter throwing Exception

asked 2015-03-04 02:46:45 +0800

rahulRambo gravatar image rahulRambo
1

Hi All, Currently I am using ZK 7.0.4.I am trying to export a grid or Listbox to Excel using ExcelExporter.This feature was working properly when I used it with ZK 7.0.0.But when I am using with ZK 7.0.4 I am getting exceptions at the third line of the code ByteArrayOutputStream out = new ByteArrayOutputStream();
ExcelExporter exporter = new ExcelExporter(); exporter.export(lbReportRevenueContributor,out); where lbReportRevenueContributor is the id of my Listbox. The exception is:-

java.lang.IllegalArgumentException: Invalid row number (-1) outside allowable range (0..1048575) at org.zkoss.poi.xssf.usermodel.XSSFRow.setRowNum(XSSFRow.java:343) at org.zkoss.poi.xssf.usermodel.XSSFSheet.createRow(XSSFSheet.java:601) at org.zkoss.poi.xssf.usermodel.XSSFSheet.createRow(XSSFSheet.java:126) at org.zkoss.exporter.excel.ExcelExporter.getOrCreateRow(ExcelExporter.java:298) at org.zkoss.exporter.excel.ExcelExporter.getOrCreateCell(ExcelExporter.java:316) at org.zkoss.exporter.excel.ExcelExporter.exportCellsWithSpan(ExcelExporter.java:268) at org.zkoss.exporter.excel.ExcelExporter.exportAuxhead(ExcelExporter.java:151) at org.zkoss.exporter.excel.ExcelExporter.exportAuxhead(ExcelExporter.java:1) at org.zkoss.exporter.AbstractExporter.exportHeaders(AbstractExporter.java:172) at org.zkoss.exporter.excel.ExcelExporter.exportTabularComponent(ExcelExporter.java:138) at org.zkoss.exporter.AbstractExporter.export(AbstractExporter.java:218) at com.huawei.eip.controller.reports.RevenueContributorController.download(RevenueContributorController.java:106)

Please help me in this regard.

Thanks, Rahul Kumar Sinha

delete flag offensive retag edit

Comments

You can try own excel exporter as shown here http://emrpms.blogspot.in/2014/06/zkexport-to-excel.html

Senthilchettyin ( 2015-03-04 04:10:30 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-08 14:00:53 +0800

Darksu gravatar image Darksu
1991 1 4

Hello rahulRambo,

I just downloaded the application that zk provides and it works correctly with zk 7.0.4-Eval

Regarding the error i found a similar issue for Apache POI as you can see below:

http://stackoverflow.com/questions/23734004/invalid-row-number-32768-outside-allowable-range-0-1048575

A question i have in mind is, how many records you are trying to export?

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-03-04 02:46:45 +0800

Seen: 26 times

Last updated: Mar 08 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More