class ColumnCellIterator extends CellIterator (View source)

Properties

protected Worksheet $worksheet Worksheet to iterate. from CellIterator
protected bool $onlyExistingCells Iterate only existing cells. from CellIterator

Methods

__destruct()

Destructor.

bool
getIterateOnlyExistingCells()

Get loop only existing cells.

adjustForExistingOnlyRange()

Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary.

setIterateOnlyExistingCells(bool $value)

Set the iterator to loop only existing cells.

__construct(Worksheet $subject = null, string $columnIndex = 'A', int $startRow = 1, int $endRow = null)

Create a new row iterator.

resetStart(int $startRow = 1)

(Re)Set the start row and the current row pointer.

resetEnd(int $endRow = null)

(Re)Set the end row.

seek(int $row = 1)

Set the row pointer to the selected row.

rewind()

Rewind the iterator to the starting row.

null|Cell
current()

Return the current cell in this worksheet column.

int
key()

Return the current iterator key.

next()

Set the iterator to its next value.

prev()

Set the iterator to its previous value.

bool
valid()

Indicate if more rows exist in the worksheet range of rows that we're iterating.

Details

__destruct()

Destructor.

bool getIterateOnlyExistingCells()

Get loop only existing cells.

Return Value

bool

protected adjustForExistingOnlyRange()

Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary.

Exceptions

Exception

setIterateOnlyExistingCells(bool $value)

Set the iterator to loop only existing cells.

Parameters

bool $value

Exceptions

Exception

__construct(Worksheet $subject = null, string $columnIndex = 'A', int $startRow = 1, int $endRow = null)

Create a new row iterator.

Parameters

Worksheet $subject The worksheet to iterate over
string $columnIndex The column that we want to iterate
int $startRow The row number at which to start iterating
int $endRow Optionally, the row number at which to stop iterating

ColumnCellIterator resetStart(int $startRow = 1)

(Re)Set the start row and the current row pointer.

Parameters

int $startRow The row number at which to start iterating

Return Value

ColumnCellIterator

Exceptions

Exception

ColumnCellIterator resetEnd(int $endRow = null)

(Re)Set the end row.

Parameters

int $endRow The row number at which to stop iterating

Return Value

ColumnCellIterator

Exceptions

Exception

ColumnCellIterator seek(int $row = 1)

Set the row pointer to the selected row.

Parameters

int $row The row number to set the current pointer at

Return Value

ColumnCellIterator

Exceptions

Exception

rewind()

Rewind the iterator to the starting row.

null|Cell current()

Return the current cell in this worksheet column.

Return Value

null|Cell

int key()

Return the current iterator key.

Return Value

int

next()

Set the iterator to its next value.

prev()

Set the iterator to its previous value.

bool valid()

Indicate if more rows exist in the worksheet range of rows that we're iterating.

Return Value

bool