- Type Parameters:
T- The data type obtained from the excel table. For example it would beStringif you wantStringdata from each cell in the table.
- All Known Subinterfaces:
IfDataTypeCellExcelTable,IfDataTypeCellExcelTableReader,IfDataTypeCellExcelTableWriter,IfDataTypeStringExcelTable,IfDataTypeStringExcelTableReader,IfExcelTableReader<T>,IfExcelTableWriter<T>,IfFormatFreeExcelTable<T>,IfFormatFreeExcelTableReader<T>,IfFormatOneLineHeaderExcelTable<T>,IfFormatOneLineHeaderExcelTableReader<T>
- All Known Implementing Classes:
CellFreeExcelTableReader,CellFreeExcelTableWriter,CellOneLineHeaderExcelTableReader,CellOneLineHeaderExcelTableWriter,ExcelTable,ExcelTableReader,ExcelTableWriter,StringExcelTableReader,StringFreeExcelTableReader,StringOneLineHeaderExcelTableReader,StringOneLineHeaderExcelTableToBeanReader
public interface IfExcelTable<T>
Provides the methods the extending interfaces use.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of the far left and top header cell to specify the position of the table.String[][]Returns an array of header label strings.Returns the excel sheet name theTableReaderand theTableWriteraccess.getStringValue(T cellData) Is used to get the header label string from the argument cell data.default voidvalidateHeaderData(List<List<String>> headerData) Validates the excel table header.
-
Method Details
-
getSheetName
Returns the excel sheet name theTableReaderand theTableWriteraccess.- Returns:
- the sheet name of the excel file
-
getFarLeftAndTopHeaderLabel
Returns the value of the far left and top header cell to specify the position of the table.The method is called when
tableStartRowNumberisnull.
SeeExcelTable.tableStartRowNumberWhen the table doesn't have a header and
tableStartRowNumberisnull, anexceptionis thrown.
So always set non-nulltableStartRowNumbervalue when the table doesn't have a header.- Returns:
- far left and top header label
"top" means the upper side of the header line when the table has multiple header lines.
-
getHeaderLabelData
Returns an array of header label strings.The data type of the return is
String[][]because table header can be multiple lines.- Returns:
- table header label strings
-
validateHeaderData
default void validateHeaderData(@RequireNonnull List<List<String>> headerData) throws jp.ecuacion.lib.core.exception.checked.BizLogicAppException Validates the excel table header.- Parameters:
headerData- string header data
The data type isList<List<String>> headerDatabecause 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.lib.core.exception.checked.BizLogicAppException- BizLogicAppException
-
getStringValue
Is used to get the header label string from the argument cell data.- Parameters:
cellData- data obtained from the cell- Returns:
Stringvalue obtained from thecellData
-