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.
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