Commit 76b600ee authored by zhengjie's avatar zhengjie
Browse files

[代码优化](v2.6):修复导出 excel 数据报错

close https://github.com/elunez/eladmin/issues/531
parent 264b3cb7
......@@ -248,7 +248,8 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
SXSSFCell currentCell = currentRow.getCell(columnNum);
if (currentCell.getCellTypeEnum() == CellType.STRING) {
int length = currentCell.getStringCellValue().getBytes().length;
if (columnWidth < length) {
// 如果长度大于最大值 65280,那就取 length
if (columnWidth < length || (columnWidth * 256 > 65280)) {
columnWidth = length;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment