From ef65db39bc63787f67682a081920d50dc0cffc33 Mon Sep 17 00:00:00 2001 From: tangwei Date: Tue, 1 Sep 2026 13:34:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=A4=9A=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E5=AF=BC=E5=87=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/yfd/platform/utils/ExportZipUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/yfd/platform/utils/ExportZipUtil.java b/backend/src/main/java/com/yfd/platform/utils/ExportZipUtil.java index 6670a6af..b11940e8 100644 --- a/backend/src/main/java/com/yfd/platform/utils/ExportZipUtil.java +++ b/backend/src/main/java/com/yfd/platform/utils/ExportZipUtil.java @@ -486,10 +486,10 @@ public class ExportZipUtil { // ---- 自动调整列宽 ---- autoSizeColumns(sheet, colCount); - // 冻结表头行 + // 冻结表头行(含多层表头:headerRowCount 表示除首行外的子表头,总冻结行数 = 1 + headerRowCount) if (currentRow > 1) { - int freezeRows = 1 + sheetData.getHeaderRowCount(); - sheet.createFreezePane(0, Math.min(freezeRows, currentRow - 1)); + int freezeRows = Math.min(1 + sheetData.getHeaderRowCount(), currentRow); + sheet.createFreezePane(0, freezeRows); } }