类 AxolotlTemplateExcelWriter

java.lang.Object
cn.toutatis.xvoid.axolotl.excel.writer.AxolotlAbstractExcelWriter
cn.toutatis.xvoid.axolotl.excel.writer.AxolotlTemplateExcelWriter
所有已实现的接口:
AxolotlExcelWriter, Closeable, AutoCloseable

public class AxolotlTemplateExcelWriter extends AxolotlAbstractExcelWriter
模板文档文件写入器
作者:
Toutatis_Gc
  • 构造器详细资料

    • AxolotlTemplateExcelWriter

      public AxolotlTemplateExcelWriter(TemplateWriteConfig templateWriteConfig)
      主构造函数
      参数:
      templateWriteConfig - 写入配置
    • AxolotlTemplateExcelWriter

      public AxolotlTemplateExcelWriter(File templateFile, TemplateWriteConfig writeConfig)
      构造函数 可以写入一个模板文件
      参数:
      templateFile - 模板文件
      writeConfig - 写入配置
  • 方法详细资料

    • write

      public AxolotlWriteResult write(Map<String,?> fixMapping, List<?> dataList)
      写入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 - 工作表索引