@@ -100,6 +100,10 @@ public class ExportParams extends ExcelBaseParams { | |||||
* 是否追加图形 | * 是否追加图形 | ||||
*/ | */ | ||||
private boolean isAppendGraph = true; | private boolean isAppendGraph = true; | ||||
/** | |||||
* 是否固定表头 | |||||
*/ | |||||
private boolean isFixedTitle= true; | |||||
/** | /** | ||||
* 单sheet最大值 | * 单sheet最大值 | ||||
* 03版本默认6W行,07默认100W | * 03版本默认6W行,07默认100W | ||||
@@ -285,4 +289,11 @@ public class ExportParams extends ExcelBaseParams { | |||||
this.headerHeight = headerHeight; | this.headerHeight = headerHeight; | ||||
} | } | ||||
public boolean isFixedTitle() { | |||||
return isFixedTitle; | |||||
} | |||||
public void setFixedTitle(boolean fixedTitle) { | |||||
isFixedTitle = fixedTitle; | |||||
} | |||||
} | } |
@@ -62,7 +62,9 @@ public class ExcelExportService extends BaseExportService { | |||||
} | } | ||||
createHeaderRow(entity, sheet, workbook, rows, excelParams, 0); | createHeaderRow(entity, sheet, workbook, rows, excelParams, 0); | ||||
rows += getRowNums(excelParams, true); | rows += getRowNums(excelParams, true); | ||||
sheet.createFreezePane(0, rows, 0, rows); | |||||
if (entity.isFixedTitle()) { | |||||
sheet.createFreezePane(0, rows, 0, rows); | |||||
} | |||||
return rows; | return rows; | ||||
} | } | ||||