Regarding HSSF Sheet issue(Invalid row number (65536) outside allowable range (0..65535) exception)

[亡魂溺海] 提交于 2021-02-04 19:31:06

问题


I am using Excel 2007 and it supports 1,048,576 rows but through my code it displays only 65,536 rows. If data is more than 65,536 rows I am getting the exception as Invalid row number (65,536) outside allowable range (0..65535).

I used HSSF API.how to display data more than 65,536 rows in Excel sheet with HSSF API only.


回答1:


Even though you are using Excel 2007, you will be limited to 65K rows, as you write to xls file using HSSF.

You should be using XSSF api, to take advantage of xlsx 1M row limitation.

For converting an HSSF object to XSSF, you can refer to https://stackoverflow.com/a/7297596/6310050



来源:https://stackoverflow.com/questions/37917938/regarding-hssf-sheet-issueinvalid-row-number-65536-outside-allowable-range-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!