Package cn.creekmoon.excel.core.W.title
Class HutoolTitleWriter<R>
java.lang.Object
cn.creekmoon.excel.core.W.Writer
cn.creekmoon.excel.core.W.title.TitleWriter<R>
cn.creekmoon.excel.core.W.title.HutoolTitleWriter<R>
-
Field Summary
FieldsModifier and TypeFieldDescriptioncn.hutool.poi.excel.BigExcelWriterprotected int当前写入行,切换sheet页时需要还原这个上下文数据protected ExcelExportFields inherited from class cn.creekmoon.excel.core.W.title.TitleWriter
depth2Titles, MAX_TITLE_DEPTH, titlesFields inherited from class cn.creekmoon.excel.core.W.Writer
sheetIndex, sheetName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint获取当前的表头数量protected void以对象形式写入cn.hutool.poi.excel.BigExcelWriter内部操作类,但是暴露出来了,希望最好不要用这个方法protected org.apache.poi.ss.usermodel.CellStyle通过内置的样式换取为当前工作簿里面的样式org.apache.poi.ss.usermodel.Workbookprotected void声明周期钩子函数, 当执行stopWrite时protected void声明周期钩子函数, 当切换sheet页时protected voidonWrite()声明周期钩子函数, 当写入数据时voidsetColumnWidth(int cols, int width) 默认设置列宽 : 简单粗暴将前500列都设置宽度void自动设置列宽默认设置列宽 : 简单粗暴将前500列都设置宽度20Methods inherited from class cn.creekmoon.excel.core.W.title.TitleWriter
addTitle, addTitle, addTitle, write
-
Field Details
-
parent
-
bigExcelWriter
public cn.hutool.poi.excel.BigExcelWriter bigExcelWriter -
currentRow
protected int currentRow当前写入行,切换sheet页时需要还原这个上下文数据
-
-
Constructor Details
-
HutoolTitleWriter
-
-
Method Details
-
countTitles
public int countTitles()获取当前的表头数量- Specified by:
countTitlesin classTitleWriter<R>
-
onWrite
protected void onWrite()Description copied from class:Writer声明周期钩子函数, 当写入数据时 -
doWrite
以对象形式写入- Specified by:
doWritein classTitleWriter<R>- Parameters:
targetDataList- 数据集
-
setColumnWidthDefault
默认设置列宽 : 简单粗暴将前500列都设置宽度20 -
setColumnWidthAuto
public void setColumnWidthAuto()自动设置列宽 -
setColumnWidth
public void setColumnWidth(int cols, int width) 默认设置列宽 : 简单粗暴将前500列都设置宽度 -
getBigExcelWriter
public cn.hutool.poi.excel.BigExcelWriter getBigExcelWriter()内部操作类,但是暴露出来了,希望最好不要用这个方法- Returns:
-
getWorkbook
public org.apache.poi.ss.usermodel.Workbook getWorkbook()- Specified by:
getWorkbookin classWriter
-
getRunningTimeCellStyle
通过内置的样式换取为当前工作簿里面的样式- Specified by:
getRunningTimeCellStylein classWriter- Parameters:
style-- Returns:
-
onSwitchSheet
protected void onSwitchSheet()Description copied from class:Writer声明周期钩子函数, 当切换sheet页时- Overrides:
onSwitchSheetin classWriter
-
onStopWrite
protected void onStopWrite()Description copied from class:Writer声明周期钩子函数, 当执行stopWrite时- Overrides:
onStopWritein classWriter
-