出现“the maximum number of cell styles was exceeded”错误的原因 当使用Apache POI库操作Excel文件(如.xls格式)时,每个工作簿中最多只能定义4000种单元格样式。如果在程序中创建了超过这个数量的单元格样式,就会抛出java.lang.IllegalStateException异常,提示“the maximum number of cell styles was exceeded”。
java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook at org.apache.poi.hssf.usermodel.HSSFWorkbook.createCellStyle(HSSFWorkbook.java:1262) ~[poi-4.1.2.jar:4.1.2] 原因是由于创建了太多的 cell styles,所以一般把ce...
就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面 报错如下: Caused by: java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook at org.apache.poi.hssf.usermodel.HSSFWorkbook.createCe...
就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面 报错如下: Caused by: java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook at org.apache.poi.hssf.usermodel.HSSFWorkbook.createCe...
在用POI导出Excel表格时,报如下错误: Caused by: java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook 原因:style创建次数太多。 改进方法 ...
简介:使用POI导出xls文件,由于数据过多,导致导出xls报错如下:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook 原因:代码中创建HSSFCellStyle cellStyle = hssfWorkbook.createCellStyle();次数过多,导致报错。
The maximum number of cell styles was exceeded. You can define up to 4000 styles POI operations Excel, when the exported data is not very large, then there is no problem, and the data is many or more,will report the following error, is due to the
The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook 1. 原因: 代码中创建 HSSFCellStyle cellStyle = hssfWorkbook.createCellStyle(); 1. 次数过多,导致报错。 解决方法: 把创建HSSFCellStyle对象放在循环之外,或者放在全局,仅创建一次就可以多次使用。
Hi all, I am using below method to create cells in excel file in Java action. And getting the error like The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook. Please find the attached images. I am using this inside a FOR loop in java...
【POI】导出xls文件报错:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook 2017-10-24 15:32 −... Angel挤一挤 0 8437 Number of Airplanes in the Sky 2019-12-21 16:40 −Description Given an list interval, which are taking off and...