类 AxolotlTemplateExcelWriter
java.lang.Object
cn.toutatis.xvoid.axolotl.excel.writer.AxolotlAbstractExcelWriter
cn.toutatis.xvoid.axolotl.excel.writer.AxolotlTemplateExcelWriter
- 所有已实现的接口:
AxolotlExcelWriter,Closeable,AutoCloseable
模板文档文件写入器
- 作者:
- Toutatis_Gc
-
字段概要
从类继承的字段 cn.toutatis.xvoid.axolotl.excel.writer.AxolotlAbstractExcelWriter
workbook -
构造器概要
构造器构造器说明AxolotlTemplateExcelWriter(TemplateWriteConfig templateWriteConfig) 主构造函数AxolotlTemplateExcelWriter(File templateFile, TemplateWriteConfig writeConfig) 构造函数 可以写入一个模板文件 -
方法概要
修饰符和类型方法说明voidclose()关闭工作簿所对应输出流voidflush()刷新数据到文件中voidflush(boolean isFinal) 写入器刷新内容 进入写入剩余内容进入关闭流前的收尾工作voidswitchSheet(int sheetIndex) 切换工作表写入Excel数据从类继承的方法 cn.toutatis.xvoid.axolotl.excel.writer.AxolotlAbstractExcelWriter
getWorkbook, getWorkbookSheet, initWorkbook
-
构造器详细资料
-
AxolotlTemplateExcelWriter
主构造函数- 参数:
templateWriteConfig- 写入配置
-
AxolotlTemplateExcelWriter
构造函数 可以写入一个模板文件- 参数:
templateFile- 模板文件writeConfig- 写入配置
-
-
方法详细资料
-
write
写入Excel数据- 参数:
fixMapping- 固定值数据dataList- 循环引用数据- 返回:
- 写入结果
- 抛出:
AxolotlWriteException- 写入异常
-
flush
public void flush(boolean isFinal) 写入器刷新内容 进入写入剩余内容进入关闭流前的收尾工作- 参数:
isFinal- 是否是最终刷新,关闭写入前的最后一次刷新
-
flush
public void flush()从接口复制的说明:AxolotlExcelWriter刷新数据到文件中 -
close
public void close()关闭工作簿所对应输出流 -
switchSheet
public void switchSheet(int sheetIndex) 从接口复制的说明:AxolotlExcelWriter切换工作表- 指定者:
switchSheet在接口中AxolotlExcelWriter- 覆盖:
switchSheet在类中AxolotlAbstractExcelWriter- 参数:
sheetIndex- 工作表索引
-