Class ExcelRow
java.lang.Object
io.github.mbenincasa.javaexcelutils.model.excel.ExcelRow
ExcelRow is the Row wrapper class of the Apache POI library- Since:
- 0.3.0
- Author:
- Mirko Benincasa
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncountAllColumns(Boolean alsoEmpty) Counts how many Cells are compiledcreateCell(Integer index) Create a new Cell in the RowRetrieve a cell by indexgetCells()The list of Cells related to the RowRetrieves the index of the last CellgetOrCreateCell(Integer index) Retrieve or create a cell by indexgetSheet()Returns the Sheet to which it belongsstatic ExcelRowof(org.apache.poi.ss.usermodel.Row row) Get to an ExcelRow instance from Apache POI RowList<?>Reads the values of all cells in the rowList<?>readValues(List<Class<?>> classes) Reads the values of all cells in the rowReads the values of all cells in the row as a Stringvoidremove()Remove the selected RowvoidremoveCell(Integer index) Removes a cell by indexvoidwriteValues(List<?> values) Write the values in the cells of the row
- 
Constructor Details- 
ExcelRowpublic ExcelRow()
 
- 
- 
Method Details- 
ofGet to an ExcelRow instance from Apache POI Row- Parameters:
- row- The Row instance to wrap
- Returns:
- The ExcelRow instance
- Since:
- 0.5.0
 
- 
removeRemove the selected Row- Throws:
- RowNotFoundException- If the row is not present or has not been created
- Since:
- 0.4.1
 
- 
getCellsThe list of Cells related to the Row- Returns:
- A list of Cells
 
- 
getCellRetrieve a cell by index- Parameters:
- index- The index of the cell requested
- Returns:
- A ExcelCell
- Throws:
- CellNotFoundException- If the cell is not present or has not been created
- Since:
- 0.4.1
 
- 
getOrCreateCellRetrieve or create a cell by index- Parameters:
- index- The index of the cell requested
- Returns:
- A ExcelCell
- Since:
- 0.4.1
 
- 
removeCellRemoves a cell by index- Parameters:
- index- The index of the row to remove
- Throws:
- CellNotFoundException- If the cell is not present or has not been created
- Since:
- 0.4.1
 
- 
writeValuesWrite the values in the cells of the row- Parameters:
- values- The values to write in the cells of the row
- Since:
- 0.4.1
 
- 
readValuesReads the values of all cells in the row- Returns:
- The list of values written in the cells
- Throws:
- ReadValueException- If an error occurs while reading
- Since:
- 0.4.1
 
- 
readValuesReads the values of all cells in the row- Parameters:
- classes- A list of Classes that is used to cast the results read
- Returns:
- The list of values written in the cells
- Throws:
- ReadValueException- If an error occurs while reading
- Since:
- 0.4.1
 
- 
readValuesAsStringReads the values of all cells in the row as a String- Returns:
- The list of values, such as String, written in the cells
- Since:
- 0.4.1
 
- 
getSheetReturns the Sheet to which it belongs- Returns:
- A ExcelSheet
 
- 
createCellCreate a new Cell in the Row- Parameters:
- index- The index in the Row
- Returns:
- A Cell
 
- 
getLastColumnIndexRetrieves the index of the last Cell- Returns:
- The index of the last Cell
 
- 
countAllColumnsCounts how many Cells are compiled- Parameters:
- alsoEmpty-- trueif you want to count Cells empty
- Returns:
- The number of Cells compiled
 
 
-