[alibaba/easyexcel]文件导出时,单元格内容长度过长时,抛出The maximum length of cell contents (text) is 32,767 characters

2024-05-21 831 views
4

文件导出时,字段长度过长时,抛出The maximum length of cell contents (text) is 32,767 characters

java.lang.IllegalArgumentException: The maximum length of cell contents (text) is 32,767 characters at org.apache.poi.xssf.streaming.SXSSFCell.setCellValue(SXSSFCell.java:325) at com.alibaba.excel.util.WorkBookUtil.createCell(WorkBookUtil.java:69) at com.alibaba.excel.write.ExcelBuilderImpl.addBasicTypeToExcel(ExcelBuilderImpl.java:102) at com.alibaba.excel.write.ExcelBuilderImpl.addOneRowOfDataToExcel(ExcelBuilderImpl.java:125) at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:63) at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:70) at com.alibaba.excel.ExcelWriter.write1(ExcelWriter.java:106)

回答

4

这个字段过长应该你这个自己解决吧。

0

啥玩意要往一个单元格里写3万字?长篇小说吗?

4

这个需要自己分开了

0

这个有放开限制方案么