Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

hssf

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.

like image 419
Manikanta Avatar asked Oct 20 '25 04:10

Manikanta


1 Answers

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

like image 139
Vijay Avatar answered Oct 21 '25 17:10

Vijay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!