public abstract class AbstractExcelFactory extends Object implements ExcelFactory
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
isHssf
是否为hssf
|
protected SheetStrategy |
sheetStrategy
生成sheet策略,默认生成多个sheet
|
protected List<Td> |
stagingTds
暂存单元格,由后续行认领
|
protected WidthStrategy |
widthStrategy
自动宽度策略,默认无宽度策略
|
protected org.apache.poi.ss.usermodel.Workbook |
workbook |
protected static int |
XLS_MAX_ROW_COUNT |
protected static int |
XLSX_MAX_ROW_COUNT |
| 构造器和说明 |
|---|
AbstractExcelFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
ExcelFactory |
applyDefaultStyle()
应用默认样式
|
protected void |
clearCache()
清除缓存
|
protected void |
closeWorkbook()
关闭工作簿
|
protected void |
createCell(Td td,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row currentRow)
创建单元格
|
protected void |
createRow(Tr tr,
org.apache.poi.ss.usermodel.Sheet sheet)
创建行-row
|
protected org.apache.poi.ss.usermodel.Workbook |
emptyWorkbook()
空工作簿
|
protected void |
freezePane(int tableIndex,
org.apache.poi.ss.usermodel.Sheet sheet)
窗口冻结
|
ExcelFactory |
freezePanes(FreezePane... freezePanes)
窗口冻结
|
protected Map<Integer,Integer> |
getColMaxWidthMap(List<Tr> trList)
获取每列最大宽度
|
protected String |
getRealSheetName(String sheetName) |
protected void |
initCellStyle(org.apache.poi.ss.usermodel.Workbook workbook)
初始化默认单元格样式
|
protected void |
setColWidth(Map<Integer,Integer> colMaxWidthMap,
org.apache.poi.ss.usermodel.Sheet sheet,
int maxColIndex)
设置每列宽度
|
ExcelFactory |
sheetStrategy(SheetStrategy sheetStrategy)
生成 sheet 策略
|
ExcelFactory |
useDefaultStyle()
是否使用默认样式
|
ExcelFactory |
widthStrategy(WidthStrategy widthStrategy)
自动宽度策略
|
ExcelFactory |
workbookType(WorkbookType workbookType)
设置workbook类型
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildprotected static final int XLSX_MAX_ROW_COUNT
protected static final int XLS_MAX_ROW_COUNT
protected org.apache.poi.ss.usermodel.Workbook workbook
protected boolean isHssf
protected WidthStrategy widthStrategy
protected SheetStrategy sheetStrategy
public ExcelFactory useDefaultStyle()
ExcelFactoryuseDefaultStyle 在接口中 ExcelFactorypublic ExcelFactory applyDefaultStyle()
ExcelFactoryapplyDefaultStyle 在接口中 ExcelFactorypublic ExcelFactory freezePanes(FreezePane... freezePanes)
ExcelFactoryfreezePanes 在接口中 ExcelFactoryfreezePanes - 窗口冻结区域public ExcelFactory workbookType(WorkbookType workbookType)
ExcelFactoryworkbookType 在接口中 ExcelFactoryworkbookType - 工作簿类型public ExcelFactory widthStrategy(WidthStrategy widthStrategy)
ExcelFactorywidthStrategy 在接口中 ExcelFactorywidthStrategy - 策略public ExcelFactory sheetStrategy(SheetStrategy sheetStrategy)
ExcelFactorysheetStrategy 在接口中 ExcelFactorysheetStrategy - 策略protected void createRow(Tr tr, org.apache.poi.ss.usermodel.Sheet sheet)
tr - trsheet - sheetprotected void createCell(Td td, org.apache.poi.ss.usermodel.Sheet sheet, org.apache.poi.ss.usermodel.Row currentRow)
td - tdsheet - sheetcurrentRow - 当前行protected org.apache.poi.ss.usermodel.Workbook emptyWorkbook()
protected void initCellStyle(org.apache.poi.ss.usermodel.Workbook workbook)
workbook - workbookprotected void freezePane(int tableIndex,
org.apache.poi.ss.usermodel.Sheet sheet)
tableIndex - table indexsheet - sheetprotected Map<Integer,Integer> getColMaxWidthMap(List<Tr> trList)
trList - trListprotected void setColWidth(Map<Integer,Integer> colMaxWidthMap, org.apache.poi.ss.usermodel.Sheet sheet, int maxColIndex)
colMaxWidthMap - 列最大宽度Mapsheet - sheetmaxColIndex - 最大列索引protected void clearCache()
protected void closeWorkbook()
Copyright © 2023. All rights reserved.