POI导出excel报错:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook
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,所以一般把cellstyle设置放到循环外面
-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------
(蓝奏云官网有些地址失效了,需要把请求地址lanzous改成lanzoux才可以)