Module jp.ecuacion.util.poi
Interface IfExcelTableReader<T>
- Type Parameters:
T- SeeIfExcelTable.
- All Superinterfaces:
IfExcelTable<T>
- All Known Subinterfaces:
IfDataTypeCellExcelTableReader,IfDataTypeStringExcelTableReader,IfFormatFreeExcelTableReader<T>,IfFormatOneLineHeaderExcelTableReader<T>
- All Known Implementing Classes:
CellFreeExcelTableReader,CellOneLineHeaderExcelTableReader,ExcelTableReader,StringExcelTableReader,StringFreeExcelTableReader,StringOneLineHeaderExcelTableReader,StringOneLineHeaderExcelTableToBeanReader
Provides the excel table reader methods.
-
Method Summary
Modifier and TypeMethodDescriptiongetCellData(org.apache.poi.ss.usermodel.Cell cell, int columnNumber) Returns the obtained value from the cell.Returns an instance ofExcelReadUtil.booleanisCellDataEmpty(T cellData) Returns whether the value of the cell is empty.updateAndGetHeaderData(List<List<T>> tableData) Updates excel data to treat it easily, like remove its header line, and returns the header list.Methods inherited from interface jp.ecuacion.util.poi.excel.table.IfExcelTable
getFarLeftAndTopHeaderLabel, getHeaderLabelData, getNumberOfHeaderLines, getSheetName, getStringValue, ignoresAdditionalColumnsOfHeaderData, ignoresAdditionalColumnsOfHeaderData, validateHeaderData
-
Method Details
-
getExcelReadUtil
ExcelReadUtil getExcelReadUtil()Returns an instance ofExcelReadUtil.- Returns:
ExcelReadUtilinstance
-
updateAndGetHeaderData
@Nullable List<List<String>> updateAndGetHeaderData(@Nonnull List<List<T>> tableData) throws jp.ecuacion.lib.core.exception.checked.BizLogicAppException 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.lib.core.exception.checked.BizLogicAppException- BizLogicAppException
-
getCellData
@Nullable T getCellData(@RequireNonnull org.apache.poi.ss.usermodel.Cell cell, int columnNumber) throws jp.ecuacion.lib.core.exception.checked.BizLogicAppException Returns the obtained value from the cell.If you want to get
Stringvalue from the cell, it returns theStringvalue.- 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.lib.core.exception.checked.BizLogicAppException- BizLogicAppException
-
isCellDataEmpty
boolean isCellDataEmpty(@Nullable T cellData) throws jp.ecuacion.lib.core.exception.checked.BizLogicAppException Returns whether the value of the cell is empty.- Parameters:
cellData- cellData- Returns:
- whether the valule of the cell is empty.
- Throws:
jp.ecuacion.lib.core.exception.checked.BizLogicAppException
-