Merge branch 'release/2.19.1.2501.01' into release/3.0.2.2504.01

This commit is contained in:
Harryxzy 2025-05-13 16:29:02 +08:00
commit bb84021758
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.*;
import weaver.wechat.util.Utils;
import java.awt.Color;
import java.math.BigDecimal;
@ -134,7 +135,7 @@ public class ExcelUtilPlus {
rowZeroCell.setCellValue(columnGroupItem.getText());
rowZeroCell.setCellStyle(titleCellStyle);
//设置列宽
sheet.setColumnWidth(i, Math.min(255, Math.max(12, columnGroupItem.getText().length() * 4)) * 256);
sheet.setColumnWidth(i, Math.min(255, Math.max(12, Utils.null2String(columnGroupItem.getText()).length() * 4)) * 256);
patternList.add(columnGroupItem.getPattern());
}