fix: 优化多表头导出格式
This commit is contained in:
parent
817c3ba49d
commit
ef65db39bc
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user