Package icu.easyj.poi.excel.hook
Class AbstractListToExcelHook
java.lang.Object
icu.easyj.poi.excel.hook.AbstractListToExcelHook
- All Implemented Interfaces:
IListToExcelHook
列表转Excel时提供的勾子抽象类
- Author:
- wangliang181230
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateCustomFirstRow(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) 创建自定义内容的首行,并合并该所有列(注意:在头行上面的一行)protected voidcreateCustomFooterRow(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) 创建自定义内容的尾行,并合并该所有列protected StringgenerateCustomFirstRowContent(Map<Object, Object> context) 生成首行的内容protected StringgenerateCustomFooterRowContent(Map<Object, Object> context) 生成尾行的内容voidonAfterCreateDataRows(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) “创建所有数据行之后” 触发的事件voidonBeforeCreateHeadRow(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) “创建头行之前” 触发的事件protected voidsetCustomRowStyle(org.apache.poi.ss.usermodel.Cell cell, ExcelCustomRowConfig configAnno) 设置自定义行样式
-
Constructor Details
-
AbstractListToExcelHook
public AbstractListToExcelHook()
-
-
Method Details
-
onBeforeCreateHeadRow
public void onBeforeCreateHeadRow(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) Description copied from interface:IListToExcelHook“创建头行之前” 触发的事件- Specified by:
onBeforeCreateHeadRowin interfaceIListToExcelHook- Parameters:
context- 表格所需上下文sheet- 表格mapping- 表格映射
-
onAfterCreateDataRows
public void onAfterCreateDataRows(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) Description copied from interface:IListToExcelHook“创建所有数据行之后” 触发的事件- Specified by:
onAfterCreateDataRowsin interfaceIListToExcelHook- Parameters:
context- 表格所需上下文sheet- 表格mapping- 表格映射
-
createCustomFirstRow
protected void createCustomFirstRow(Map<Object, Object> context, org.apache.poi.ss.usermodel.Sheet sheet, ExcelMapping mapping) 创建自定义内容的首行,并合并该所有列(注意:在头行上面的一行)- Parameters:
context- 表格所需的上下文sheet- 表格mapping- 表格映射
-
generateCustomFirstRowContent
生成首行的内容- Parameters:
context- 表格所需的上下文- Returns:
- 生成首行的内容
-
setCustomRowStyle
protected void setCustomRowStyle(org.apache.poi.ss.usermodel.Cell cell, ExcelCustomRowConfig configAnno) 设置自定义行样式- Parameters:
cell- 首行单元格configAnno- 表格映射
-