public class SheetConfig<T> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected short |
colorIndex
2003版本 调色板自定义颜色索引(可能会覆盖预设颜色), 最大只能有 64-32个自定义颜色
|
protected Map<Integer,org.apache.poi.ss.usermodel.CellStyle> |
columnStyles
列样式
key: index
value: style
|
protected Map<Integer,Function<T,org.apache.poi.ss.usermodel.CellStyle>> |
columnStyleSelector
列样式选择器
有选择到的将会覆盖原有样式
|
protected Map<Integer,ExportFieldOption> |
fieldOptions
列配置
key: index
value: option
|
protected Map<Integer,org.apache.poi.ss.usermodel.CellStyle> |
headerStyles
表头样式
key: index
value: style
|
protected ExportInitializer<?> |
initializer |
protected ExportSheetOption |
sheetOption
sheet配置
|
Modifier | Constructor and Description |
---|---|
protected |
SheetConfig() |
Modifier and Type | Method and Description |
---|---|
SheetConfig<T> |
cleanColumnStyle(int column)
清空数据列样式 不包括已设置过的
|
SheetConfig<T> |
cleanHeaderStyle(int column)
清空表头列样式 不包括已设置过的
|
SheetConfig<T> |
cleanStyle(int column)
清空列样式 不包括已设置过的
|
SheetConfig<T> |
columnUseHeadStyle()
数据使用表头列样式 不包括已设置过的
|
SheetConfig<T> |
columnUseHeadStyle(int column)
数据使用表头列样式 不包括已设置过的
|
Map<Integer,org.apache.poi.ss.usermodel.CellStyle> |
getColumnStyles() |
Map<Integer,Function<T,org.apache.poi.ss.usermodel.CellStyle>> |
getColumnStyleSelector() |
Map<Integer,ExportFieldOption> |
getFieldOptions() |
Map<Integer,org.apache.poi.ss.usermodel.CellStyle> |
getHeaderStyles() |
ExportSheetOption |
getSheetOption() |
SheetConfig<T> |
headUseColumnStyle()
表头使用数据列样式 不包括已设置过的
|
SheetConfig<T> |
headUseColumnStyle(int column)
表头使用数据列样式 不包括已设置过的
|
SheetConfig<T> |
setColumnStyle(int column,
org.apache.poi.ss.usermodel.CellStyle style)
设置数据样式 不包括已设置过的
|
SheetConfig<T> |
setColumnStyle(int column,
ExportFieldOption option)
设置数据样式 不包括已设置过的
|
SheetConfig<T> |
setColumnStyle(int column,
Function<T,org.apache.poi.ss.usermodel.CellStyle> selector)
设置数据样式选择器
|
SheetConfig<T> |
setHeaderStyle(int column,
org.apache.poi.ss.usermodel.CellStyle style)
设置表头样式 不包括已设置过的
|
SheetConfig<T> |
setHeaderStyle(int column,
ExportFieldOption option)
设置表头样式 不包括已设置过的
|
SheetConfig<T> |
setStyle(int column,
org.apache.poi.ss.usermodel.CellStyle style)
设置列样式 不包括已设置过的
|
SheetConfig<T> |
setStyle(int column,
ExportFieldOption option)
设置列样式 不包括已设置过的
|
protected short colorIndex
protected ExportSheetOption sheetOption
protected Map<Integer,org.apache.poi.ss.usermodel.CellStyle> columnStyles
protected Map<Integer,org.apache.poi.ss.usermodel.CellStyle> headerStyles
protected Map<Integer,Function<T,org.apache.poi.ss.usermodel.CellStyle>> columnStyleSelector
有选择到的将会覆盖原有样式
protected Map<Integer,ExportFieldOption> fieldOptions
protected ExportInitializer<?> initializer
public SheetConfig<T> cleanStyle(int column)
column
- 列public SheetConfig<T> cleanHeaderStyle(int column)
column
- 列public SheetConfig<T> cleanColumnStyle(int column)
column
- 列public SheetConfig<T> headUseColumnStyle()
public SheetConfig<T> headUseColumnStyle(int column)
column
- columnpublic SheetConfig<T> columnUseHeadStyle()
public SheetConfig<T> columnUseHeadStyle(int column)
column
- columnpublic SheetConfig<T> setStyle(int column, org.apache.poi.ss.usermodel.CellStyle style)
column
- 列style
- 样式public SheetConfig<T> setHeaderStyle(int column, org.apache.poi.ss.usermodel.CellStyle style)
column
- 列style
- 样式public SheetConfig<T> setColumnStyle(int column, org.apache.poi.ss.usermodel.CellStyle style)
column
- 列style
- 样式public SheetConfig<T> setStyle(int column, ExportFieldOption option)
column
- 列option
- 样式public SheetConfig<T> setHeaderStyle(int column, ExportFieldOption option)
column
- 列option
- 样式public SheetConfig<T> setColumnStyle(int column, ExportFieldOption option)
column
- 列option
- 样式public SheetConfig<T> setColumnStyle(int column, Function<T,org.apache.poi.ss.usermodel.CellStyle> selector)
column
- columnselector
- selectorpublic ExportSheetOption getSheetOption()
public Map<Integer,Function<T,org.apache.poi.ss.usermodel.CellStyle>> getColumnStyleSelector()
public Map<Integer,ExportFieldOption> getFieldOptions()
Copyright © 2024. All rights reserved.