T
- Type of the items in the collection, either ExcelRow
or ExcelColumn
.public abstract class ExcelRowColumnCollectionBaseGeneric<T extends ExcelColumnRowBase> extends ExcelRowColumnCollectionBase implements Iterable<T>
Modifier and Type | Method and Description |
---|---|
abstract T |
get(int index)
Gets the row / column with the specified index.
|
T |
get(String name)
Gets the row / column with the specified name.
|
Iterator<T> |
iterator()
Returns an iterator that iterates through the collection.
|
int |
size()
Gets the number of currently allocated elements (dynamically changes when worksheet is modified).
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public abstract T get(int index)
Look at following code for cell referencing examples:
ExcelWorksheet ws = excelFile.getWorksheets().getActiveWorksheet();
ws.getCell("B2").setValue("Cell B2.");
ws.getCell(6, 0).setValue("Cell in row 7 and column A.");
ws.getRow(2).getCell(0).setValue("Cell in row 3 and column A.");
ws.getRow("4").getCell("B").setValue("Cell in row 4 and column B.");
ws.getColumn(2).getCell(4).setValue("Cell in column C and row 5.");
ws.getColumn("AA").getCell("6").setValue("Cell in AA column and row 6.");
index
- The zero-based index of the row / column.public final T get(String name)
Look at following code for cell referencing examples:
ExcelWorksheet ws = excelFile.getWorksheets().getActiveWorksheet();
ws.getCell("B2").setValue("Cell B2.");
ws.getCell(6, 0).setValue("Cell in row 7 and column A.");
ws.getRow(2).getCell(0).setValue("Cell in row 3 and column A.");
ws.getRow("4").getCell("B").setValue("Cell in row 4 and column B.");
ws.getColumn(2).getCell(4).setValue("Cell in column C and row 5.");
ws.getColumn("AA").getCell("6").setValue("Cell in AA column and row 6.");
name
- The name of the row / column.public final Iterator<T> iterator()
iterator
in interface Iterable<T extends ExcelColumnRowBase>
public final int size()
size
in class ExcelRowColumnCellCollectionBase
© GemBox Ltd. — All rights reserved.