Interface IfExcelTableReader<T>

Type Parameters:
T - See IfExcelTable.
All Superinterfaces:
IfExcelTable<T>
All Known Subinterfaces:
IfDataTypeCellExcelTableReader, IfDataTypeStringExcelTableReader, IfFormatFreeExcelTableReader<T>, IfFormatOneLineHeaderExcelTableReader<T>
All Known Implementing Classes:
CellFreeExcelTableReader, CellOneLineHeaderExcelTableReader, ExcelTableReader, StringExcelTableReader, StringFreeExcelTableReader, StringOneLineHeaderExcelTableReader, StringOneLineHeaderExcelTableToBeanReader

public interface IfExcelTableReader<T> extends IfExcelTable<T>
Provides the excel table reader methods.
  • Method Details

    • validateHeaderData

      default void validateHeaderData(@RequireNonnull List<List<T>> headerData) throws jp.ecuacion.util.poi.excel.exception.ExcelAppException
      Validates the excel table header.
      Parameters:
      headerData - string header data
      The data type is List<List<String>> headerData because the header with multiple lines may exist.
      Pass a list with `size() == 0` when it's a table with no header or nothing to validate.
      Throws:
      jp.ecuacion.util.poi.excel.exception.ExcelAppException - ExcelAppException
    • updateAndGetHeaderData

      @Nullable List<List<String>> updateAndGetHeaderData(@Nonnull List<List<T>> tableData) throws jp.ecuacion.util.poi.excel.exception.ExcelAppException
      Updates excel data to treat it easily, like remove its header line, and returns the header list.

      Considering various patterns of headers, return type ls List<List<String>>.

      Parameters:
      tableData - table data
      Returns:
      header data
      Throws:
      jp.ecuacion.util.poi.excel.exception.ExcelAppException - ExcelAppException
    • getCellData

      @Nullable T getCellData(@RequireNonnull org.apache.poi.ss.usermodel.Cell cell, int columnNumber) throws jp.ecuacion.util.poi.excel.exception.ExcelAppException
      Returns the obtained value from the cell.

      If you want to get String value from the cell, it returns the String value.

      Parameters:
      cell - cell, may be null.
      columnNumber - the column number data is obtained from, starting with 1 and column A is equal to columnNumber 1. When the far left column of a table is 2 and you want to speciries the far left column, the columnNumber is 2.
      Returns:
      the obtained value from the cell
      Throws:
      jp.ecuacion.util.poi.excel.exception.ExcelAppException - ExcelAppException
    • isCellDataEmpty

      boolean isCellDataEmpty(@Nullable T cellData) throws jp.ecuacion.util.poi.excel.exception.ExcelAppException
      Returns whether the value of the cell is empty.
      Parameters:
      cellData - cellData
      Returns:
      whether the valule of the cell is empty.
      Throws:
      jp.ecuacion.util.poi.excel.exception.ExcelAppException