解决poi导出报4000最大样式错误:java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook错误

去apache官网下载相关版本的源代码:https://archive.apache.org/dist/poi/release/src/

修改源代码文件中 MAX_STYLES 静态常量:poi-src-3.10-FINAL-20140208/poi-3.10-FINAL/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

注意:比较影响性能

 

posted @ 2019-07-23 13:53  Java-Legend  阅读(1996)  评论(0编辑  收藏  举报