- Type Parameters:
T- SeeIfExcelTable.
- All Implemented Interfaces:
IfExcelTable<T>
- Direct Known Subclasses:
ExcelTableReader,ExcelTableWriter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected @NotNull StringIs the sheet name of the excel file.protected @jakarta.validation.constraints.Min(1L) intIs the column number from which the table starts.protected @Min(1L) IntegerIs the row number from which the table starts. -
Constructor Summary
ConstructorsConstructorDescriptionExcelTable(String sheetName, Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance with the sheet name, the position and the size of the excel table. -
Method Summary
Modifier and TypeMethodDescriptionintReturns tableStartColumnNumber.intgetPoiBasisDeterminedTableStartRowNumber(org.apache.poi.ss.usermodel.Sheet sheet, int excelBasisTableStartColumnNumber) Returns the row number at which the table starts.Returns the excel sheet name theTableReaderand theTableWriteraccess.booleanObtains the boolean value which indicates whethervalidateHeaderDataignores additional header columns.booleanObtains whether header is top (normal table) or left.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfExcelTable
getFarLeftAndTopHeaderLabel, getHeaderLabelData, getNumberOfHeaderLines, getStringValue, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite
-
Field Details
-
sheetName
Is the sheet name of the excel file. -
tableStartRowNumber
Is the row number from which the table starts.The minimum value is
1, which means the table starts at the first line of the excel sheet.0or the number smaller than that is not acceptable.
nullis acceptable, which meanstableStartRowNumberis decided by the far left header value of the table.The header value is obtained from
IfExcelTable.getFarLeftAndTopHeaderLabel(). -
tableStartColumnNumber
@Min(1L) protected @jakarta.validation.constraints.Min(1L) int tableStartColumnNumberIs the column number from which the table starts.The minimum value is
1, which means the table starts at the far left column of the excel sheet.0or the number smaller than that is not acceptable.
nullis not acceptable.
(Its data type is primitiveint, so it can't havenullanyway.) -
ignoresAdditionalColumnsOfHeaderData
protected boolean ignoresAdditionalColumnsOfHeaderData -
isVerticalAndHorizontalOpposite
protected boolean isVerticalAndHorizontalOpposite
-
-
Constructor Details
-
ExcelTable
public ExcelTable(@RequireNonnull String sheetName, @Nullable Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance with the sheet name, the position and the size of the excel table.- Parameters:
sheetName- SeesheetName.tableStartRowNumber- SeetableStartRowNumber.tableStartColumnNumber- SeetableStartColumnNumber.
-
-
Method Details
-
getSheetName
Description copied from interface:IfExcelTableReturns the excel sheet name theTableReaderand theTableWriteraccess.- Specified by:
getSheetNamein interfaceIfExcelTable<T>- Returns:
- the sheet name of the excel file
-
getPoiBasisDeterminedTableStartRowNumber
public int getPoiBasisDeterminedTableStartRowNumber(@RequireNonnull org.apache.poi.ss.usermodel.Sheet sheet, int excelBasisTableStartColumnNumber) Returns the row number at which the table starts.The minimum value of
tableStartRowNumberis zero bacause the top-left of the excel sheet is (1, 1) in R1C1 format, but since apache poi specifies the the top-left of the excel sheet is (0, 0), this method returns the poi-based row number.When
tableStartRowNumberis set tonull, this method will find the string designated withIfExcelTable.getFarLeftAndTopHeaderLabel()from the top row in the column number ofexcelBasisTableStartColumnNumber.- Parameters:
sheet- excel sheet- Returns:
- the row number the table starts, greater than or equal to
1.
-
getPoiBasisDeterminedTableStartColumnNumber
public int getPoiBasisDeterminedTableStartColumnNumber()Returns tableStartColumnNumber.The minimum value of
tableStartColumnNumberis zero bacause the top-left of the excel sheet is (1, 1) in R1C1 format, but since apache poi specifies the the top-left of the excel sheet is (0, 0), this method returns the poi-based row number.- Returns:
- the column number the table starts
-
ignoresAdditionalColumnsOfHeaderData
public boolean ignoresAdditionalColumnsOfHeaderData()Description copied from interface:IfExcelTableObtains the boolean value which indicates whethervalidateHeaderDataignores additional header columns.- Specified by:
ignoresAdditionalColumnsOfHeaderDatain interfaceIfExcelTable<T>- Returns:
- boolean
-
isVerticalAndHorizontalOpposite
public boolean isVerticalAndHorizontalOpposite()Description copied from interface:IfExcelTableObtains whether header is top (normal table) or left.truemeans headers are at the left.- Specified by:
isVerticalAndHorizontalOppositein interfaceIfExcelTable<T>
-