I have a requirement where i need to create a new sheet and write the overflowing data(1048576+ rows) on that sheet. I can do it by creating a code which keeps a counter each time before creating a new row and create a new sheet and continue writing the remaining data on new sheet. I need to know is there any API that does the same or if any tried and tested way available already ? currently Using POI 3.16
Hello Nilesh, unfortunately there's no such API call as it's not something Excel/POI does. I suggest you to implement some Supplier<Row> which will track its position on a sheet and create a new one, if necessary. P.S. You probably don't need a counter, just hold a reference to the last/newly created row and compare its index to the SpreadsheetVersion.yourVersion().getMaxRowIndex() (may not remember the name exactly).