-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Hello @rzymek , I understand that in Microsoft Excel, the maximum number of rows a worksheet can contain is 1,048,576. When generating a large .xlsx file, FastExcel correctly creates a new sheet after reaching the per-sheet row limit I defined (e.g., 1,000,000 rows). If the remaining rows to write on the second sheet are less than or equal to 48,576, everything works fine.
However, if the remaining rows for the second sheet are more than 48,576 (for example, if the total is 1,050,000 rows, so the second sheet needs to hold 50,000 rows), FastExcel throws an IllegalArgumentException
when writing to the second sheet.
Summary:
- Sheet 1: 1,000,000 rows (OK)
- Sheet 2: up to 48,576 rows (OK)
- Sheet 2: more than 48,576 rows (Exception occurs)
Expected:
FastExcel should allow writing up to the Excel hard limit (1,048,576 rows per sheet, including header) on any sheet, not just the first sheet.
Actual:
It fails with an IllegalArgumentException
if the second (or later) sheet needs to hold more than 48,576 rows.

then it reaches to:
java.lang.IllegalArgumentException
at org.dhatim.fastexcel.Worksheet.cell(Worksheet.java:304)
at org.dhatim.fastexcel.Worksheet.value(Worksheet.java:556)