Closed virzak closed 1 year ago
Why do you want this? Removing this limit will make the package corrupt, if you save it as xlsx or xlsm. It could also lead to other unexpected behaviours and performance issues.
if you save it as xlsx or xlsm
The purpose is to produce csv file. Why not validate when saving to xlsx/xslm instead? That way csv files can produce arbitrary number of rows and excel files will still be valid.
I don't think EPPlus is the right tool to create gigantic csv files. Removing the boundries of Excel can easily cause unexpected issues in EPPlus. Csv is just plain text, so you can easily write this using a normal FileStream
. I assume you use functionality in EPPlus, as you want to use it, so I suggest you link worksheets if you have the need of 1M records +.
The library validates addresses in absolutely every situation
https://github.com/EPPlusSoftware/EPPlus/blob/6596f5135ac8cc455cd2baf7d9b555c7164d782c/src/EPPlus/ExcelRange.cs#L158-L167
However the 1,048,576 row limit only makes sense in excel context.
A test case below should be valid. It would be especially useful when more than 1,048,576 records need to be handled.
Would you consider a setting that would skip MaxRows and MaxColumns validation?