Interface IfDataTypeCellExcelTableWriter

All Superinterfaces:
IfDataTypeCellExcelTable, IfExcelTable<org.apache.poi.ss.usermodel.Cell>, IfExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
All Known Implementing Classes:
CellFreeExcelTableWriter, CellOneLineHeaderExcelTableWriter

public interface IfDataTypeCellExcelTableWriter extends IfDataTypeCellExcelTable, IfExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
Provides the excel table writer interface with object type obtained from the excel data is Cell.
  • Method Details

    • writeToCell

      default void writeToCell(int columnNumberFromZero, org.apache.poi.ss.usermodel.Cell sourceCellData, org.apache.poi.ss.usermodel.Cell destCell)
      Writes a value to the cell.

      The number of CellStyle in an excel file has limit: 64,000. If it exceeds, we'll get the exception below. To avoid it CellStyle has to be reused. To reuse style

      Specified by:
      writeToCell in interface IfExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
      Parameters:
      columnNumberFromZero - column number starting from zero. Used as a key to store and reuse the style for each column.
      sourceCellData - sourceCellData
      destCell - destCell
    • copiesDataFormatOnly

      IfDataTypeCellExcelTableWriter copiesDataFormatOnly(boolean value)
      Sets copiesDataFormatOnly value.

      When this is true, whole style is not copied to the destination cell, but DataFormat only.
      This means grid-line, font, font-size, cell color, etc... of the cell is not copied.

      Parameters:
      value - boolean
    • copiesDataFormatOnly

      boolean copiesDataFormatOnly()
      Returns copiesDataFormatOnly value.

      When this is true, whole style is not copied to the destination cell, but DataFormat only.
      This means grid-line, font, font-size, cell color, etc... of the cell is not copied.

      Returns:
      boolean
    • getColumnStyleMap

      Map<Integer, org.apache.poi.ss.usermodel.CellStyle> getColumnStyleMap()
      Gets columnStyleMap to reuse CellStyle.
      Returns:
      columnStyleMap