14:44:33.302 [main] DEBUG com.alibaba.excel.metadata.property.ExcelHeadProperty - The initialization sheet/table 'ExcelHeadProperty' is complete , head kind is NONE
14:44:33.305 [main] DEBUG com.alibaba.excel.context.WriteContextImpl - CurrentConfiguration is writeSheetHolder
14:44:33.350 [main] DEBUG com.alibaba.excel.context.WriteContextImpl - Sheet:null,null is already existed
14:44:33.350 [main] DEBUG com.alibaba.excel.context.WriteContextImpl - CurrentConfiguration is writeSheetHolder
14:44:33.363 [main] INFO com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder - create new style:com.alibaba.excel.write.metadata.style.WriteCellStyle@f7f17e5c,null
14:44:33.369 [main] INFO com.alibaba.excel.util.StyleUtil - create new data fromat:com.alibaba.excel.metadata.data.DataFormatData@4f770922
14:44:33.370 [main] INFO com.alibaba.excel.util.StyleUtil - create new font:com.alibaba.excel.write.metadata.style.WriteFont@96caf36,null
14:44:33.385 [main] DEBUG org.apache.poi.xssf.streaming.SXSSFSheet - Failed to set dimension details on sheet
java.lang.IllegalArgumentException: Invalid cell range, having lastRow < firstRow || lastCol < firstCol, had rows -1 >= -1 or cells 0 >= 16383
at org.apache.poi.ss.util.CellRangeAddress.<init>(CellRangeAddress.java:48)
at org.apache.poi.xssf.streaming.SXSSFSheet.deriveDimension(SXSSFSheet.java:2190)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.flushSheets(SXSSFWorkbook.java:994)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:938)
at com.alibaba.excel.context.WriteContextImpl.finish(WriteContextImpl.java:381)
at com.alibaba.excel.write.ExcelBuilderImpl.finish(ExcelBuilderImpl.java:99)
at com.alibaba.excel.ExcelWriter.finish(ExcelWriter.java:143)
at com.alibaba.excel.ExcelWriter.close(ExcelWriter.java:158)
at com.junpeng.testmysql.PrintTest.main(PrintTest.java:46)
14:44:33.385 [main] DEBUG org.apache.poi.xssf.streaming.SXSSFSheet - Failed to set dimension details on sheet
java.lang.IllegalArgumentException: Invalid cell range, having lastRow < firstRow || lastCol < firstCol, had rows -1 >= -1 or cells 0 >= 16383
at org.apache.poi.ss.util.CellRangeAddress.<init>(CellRangeAddress.java:48)
at org.apache.poi.xssf.streaming.SXSSFSheet.deriveDimension(SXSSFSheet.java:2190)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.flushSheets(SXSSFWorkbook.java:994)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:938)
at com.alibaba.excel.context.WriteContextImpl.finish(WriteContextImpl.java:381)
at com.alibaba.excel.write.ExcelBuilderImpl.finish(ExcelBuilderImpl.java:99)
at com.alibaba.excel.ExcelWriter.finish(ExcelWriter.java:143)
at com.alibaba.excel.ExcelWriter.close(ExcelWriter.java:158)
at com.junpeng.testmysql.PrintTest.main(PrintTest.java:46)
14:44:33.385 [main] DEBUG org.apache.poi.xssf.streaming.SXSSFSheet - Failed to set dimension details on sheet
java.lang.IllegalArgumentException: Invalid cell range, having lastRow < firstRow || lastCol < firstCol, had rows -1 >= -1 or cells 0 >= 16383
at org.apache.poi.ss.util.CellRangeAddress.<init>(CellRangeAddress.java:48)
at org.apache.poi.xssf.streaming.SXSSFSheet.deriveDimension(SXSSFSheet.java:2190)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.flushSheets(SXSSFWorkbook.java:994)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:938)
at com.alibaba.excel.context.WriteContextImpl.finish(WriteContextImpl.java:381)
at com.alibaba.excel.write.ExcelBuilderImpl.finish(ExcelBuilderImpl.java:99)
at com.alibaba.excel.ExcelWriter.finish(ExcelWriter.java:143)
at com.alibaba.excel.ExcelWriter.close(ExcelWriter.java:158)
at com.junpeng.testmysql.PrintTest.main(PrintTest.java:46)
14:44:33.428 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save content types part
14:44:33.498 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save package relationships
14:44:33.502 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'docProps/app.xml'
14:44:33.503 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'docProps/core.xml'
14:44:33.505 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'docProps/custom.xml'
14:44:33.505 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/sharedStrings.xml'
14:44:33.505 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/styles.xml'
14:44:33.506 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/theme/theme1.xml'
14:44:33.506 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/workbook.xml'
14:44:33.508 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/worksheets/sheet1.xml'
14:44:33.509 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/worksheets/sheet2.xml'
14:44:33.509 [main] DEBUG org.apache.poi.openxml4j.opc.ZipPackage - Save part 'xl/worksheets/sheet3.xml'
14:44:33.543 [main] DEBUG com.alibaba.excel.context.WriteContextImpl - Finished write.
触发场景描述
使用模板导出excel,参考官方的模板代码,做了一些数据的填充调整 我的pom版本:
我根据报错的位置坐了debug,截图如下:
代码如下:
触发Bug的代码
代码可以正常运行,且可以达到填充并且正常的生成excel,但是运行过程中会出现以下错误日志,希望维护人员帮忙解决一下,非常感谢。