sheet("many rows"){
20000.times{
row {
cell {
value '1'
style 'h1'
}
cell {
value '2'
style 'h2'
}
cell {
value '3'
style 'h1'
}
cell {
value '4'
style 'h2'
}
}
}
}
Expected no exception to be thrown, but got 'java.lang.IllegalStateException'
at spock.lang.Specification.noExceptionThrown(Specification.java:118)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec.create sample spreadsheet(PoiExcelBuilderSpec.groovy:389)
Caused by: java.lang.IllegalStateException: The maximum number of Cell Styles was exceeded. You can define up to 64000 style in a .xlsx Workbook
at org.apache.poi.xssf.model.StylesTable.createCellStyle(StylesTable.java:567)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle(XSSFWorkbook.java:659)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle(XSSFWorkbook.java:108)
at org.modelcatalogue.builder.spreadsheet.poi.PoiCellStyle.<init>(PoiCellStyle.groovy:37)
at org.modelcatalogue.builder.spreadsheet.poi.PoiCell.style(PoiCell.groovy:86)
at org.modelcatalogue.builder.spreadsheet.poi.PoiRow.cell(PoiRow.groovy:55)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec$__spock_feature_0_0_closure1$_closure2$_closure15.closure100$_closure101(PoiExcelBuilderSpec.groovy:371)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.modelcatalogue.builder.spreadsheet.poi.PoiSheet.row(PoiSheet.groovy:34)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec$__spock_feature_0_0_closure1$_closure2.closure15$_closure100(PoiExcelBuilderSpec.groovy:362)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec$__spock_feature_0_0_closure1.closure2$_closure15(PoiExcelBuilderSpec.groovy:361)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.modelcatalogue.builder.spreadsheet.poi.PoiWorkbook.sheet(PoiWorkbook.groovy:29)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec.$spock_feature_0_0_closure1$_closure2(PoiExcelBuilderSpec.groovy:360)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.modelcatalogue.builder.spreadsheet.poi.PoiSpreadsheetBuilder.build(PoiSpreadsheetBuilder.groovy:15)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec.create sample spreadsheet_closure1(PoiExcelBuilderSpec.groovy:23)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.modelcatalogue.builder.spreadsheet.poi.PoiExcelBuilderSpec.create sample spreadsheet(PoiExcelBuilderSpec.groovy:22)