From 83b11c7c3109ea29fa11c32c8ddb005f301912d3 Mon Sep 17 00:00:00 2001 From: lizq <18292031841@163.com> Date: Thu, 16 Jan 2025 16:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3excel=E6=8A=A5=E8=A1=A8=20?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=92=8C=E5=AF=BC=E5=87=BA=E7=9A=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8D=E4=B8=80=E6=A0=B7=20=EF=BC=88cherry=20picked?= =?UTF-8?q?=20commit=20from=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gaea/business/modules/reportexcel/util/XlsSheetUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/XlsSheetUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/XlsSheetUtil.java index 2c902dfd..ed86901a 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/XlsSheetUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/XlsSheetUtil.java @@ -49,11 +49,12 @@ public class XlsSheetUtil { Map> cellMap = cellGroup(cells_json); //循环每一行 // 样式创建放到循环外层,防止样式过多,超出excel最大样式限制 - CellStyle style = wb.createCellStyle(); + // CellStyle style = wb.createCellStyle(); for (Integer r : cellMap.keySet()) { Row row = sheet.createRow(r); //循环每一列 for (JSONObject col : cellMap.get(r)) { + CellStyle style = wb.createCellStyle(); createCell(wb, sheet, row, col,style); } }