Class CellOneLineHeaderExcelTableReader
- All Implemented Interfaces:
IfDataTypeCellExcelTable,IfExcelTable<org.apache.poi.ss.usermodel.Cell>,IfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>,IfDataTypeCellExcelTableReader,IfExcelTableReader<org.apache.poi.ss.usermodel.Cell>,IfFormatOneLineHeaderExcelTableReader<org.apache.poi.ss.usermodel.Cell>
It obtains cell values as Cell object.
The header line is required.
This class reads the table at the designated position and designated lines and columns.
Finish reading if all the columns are empty in a line.
-
Nested Class Summary
Nested classes/interfaces inherited from class jp.ecuacion.util.poi.excel.table.reader.ExcelTableReader
ExcelTableReader.IterableReader<T>, ExcelTableReader.IteratorReader<T>Nested classes/interfaces inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
ExcelTable.ContextContainer -
Field Summary
Fields inherited from class jp.ecuacion.util.poi.excel.table.reader.ExcelTableReader
tableColumnSizeGivenByConstructor, tableRowSizeGivenByConstructorFields inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, sheetName, tableStartColumnNumber, tableStartRowNumber -
Constructor Summary
ConstructorsConstructorDescriptionCellOneLineHeaderExcelTableReader(String sheetName, String[] headerLabels, Integer tableStartRowNumber, int tableStartColumnNumber, Integer tableRowSize) Constructs a new instance. the obtained value from an empty cell isnull. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of the far left and top header cell to specify the position of the table.String[]Defines the header labels in the excel table.Methods inherited from class jp.ecuacion.util.poi.excel.table.reader.ExcelTableReader
getIterable, getReadyToReadTableData, getTableColumnSize, getTableRowSize, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, read, read, setTableColumnSizeMethods inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
getPoiBasisDeterminedTableStartColumnNumber, getPoiBasisDeterminedTableStartRowNumber, getSheetName, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOppositeMethods 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.IfDataTypeCellExcelTable
getStringValueMethods inherited from interface jp.ecuacion.util.poi.excel.table.reader.IfDataTypeCellExcelTableReader
getCellData, isCellDataEmptyMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfExcelTable
getSheetName, ignoresAdditionalColumnsOfHeaderData, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, isVerticalAndHorizontalOppositeMethods inherited from interface jp.ecuacion.util.poi.excel.table.reader.IfExcelTableReader
validateHeaderDataMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfFormatOneLineHeaderExcelTable
getHeaderLabelData, getNumberOfHeaderLinesMethods inherited from interface jp.ecuacion.util.poi.excel.table.reader.IfFormatOneLineHeaderExcelTableReader
updateAndGetHeaderData
-
Constructor Details
-
CellOneLineHeaderExcelTableReader
public CellOneLineHeaderExcelTableReader(@RequireNonnull String sheetName, @RequireNonnull String[] headerLabels, @Nullable Integer tableStartRowNumber, int tableStartColumnNumber, @Nullable Integer tableRowSize) Constructs a new instance. the obtained value from an empty cell isnull.tableColumnSizeis not designated becausetableColumnSizeof the table is obviously equal to the length of the header array.About the params
sheetName,tableStartRowNumber,tableStartColumnNumber,tableRowSizeandtableColumnSize, seeExcelTableReader(String, Integer, int, Integer, Integer).
-
-
Method Details
-
getFarLeftAndTopHeaderLabel
Description copied from interface:IfExcelTableReturns 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.- Specified by:
getFarLeftAndTopHeaderLabelin interfaceIfExcelTable<org.apache.poi.ss.usermodel.Cell>- Specified by:
getFarLeftAndTopHeaderLabelin interfaceIfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>- Returns:
- far left and top header label
"top" means the upper side of the header line when the table has multiple header lines.
-
getHeaderLabels
Description copied from interface:IfFormatOneLineHeaderExcelTableDefines the header labels in the excel table.It can be like
new String[] {"first name", "last name", "age"}.- Specified by:
getHeaderLabelsin interfaceIfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>
-