Class ExcelTableWriter<T>

java.lang.Object
jp.ecuacion.util.poi.excel.table.ExcelTable<T>
jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter<T>
Type Parameters:
T - See IfExcelTable.
All Implemented Interfaces:
IfExcelTable<T>, IfExcelTableWriter<T>
Direct Known Subclasses:
CellFreeExcelTableWriter, CellOneLineHeaderExcelTableWriter

public abstract class ExcelTableWriter<T> extends ExcelTable<T> implements IfExcelTableWriter<T>
Is a parent of excel table writer classes.
  • Constructor Details

  • Method Details

    • write

      public void write(@Nullable String templateFilePath, @RequireNonnull String destFilePath, @RequireNonnull List<List<T>> data) throws Exception
      Writes table data to the designated excel file.
      Parameters:
      destFilePath - destFilePath
      data - dataList
      Throws:
      Exception
    • getHeaderData

      @Nonnull protected abstract List<List<String>> getHeaderData(@Nullable String templateFilePath, int tableColumnSize) throws org.apache.poi.EncryptedDocumentException, jp.ecuacion.lib.core.exception.checked.AppException, IOException
      Obtains header list from the file at templateFilePath.
      Parameters:
      templateFilePath - nullable when the data is written to a new excel file.
      tableColumnSize - tableColumnSize
      Returns:
      the list of String, may be an empty list when templateFilePath is null.
      Throws:
      IOException - IOException
      jp.ecuacion.lib.core.exception.checked.AppException - AppException
      org.apache.poi.EncryptedDocumentException - EncryptedDocumentException