81 $this->endRow =
$endRow ?: $this->worksheet->getHighestRow();
96 if ($this->onlyExistingCells && !($this->worksheet->cellExistsByColumnAndRow($this->columnIndex,
$row))) {
99 if (($row < $this->startRow) || (
$row > $this->endRow)) {
102 $this->currentRow =
$row;
120 return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow);
126 public function key(): int
139 ($this->onlyExistingCells) &&
140 (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) &&
141 ($this->currentRow <= $this->endRow)
153 ($this->onlyExistingCells) &&
154 (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) &&
155 ($this->currentRow >= $this->startRow)
164 return $this->currentRow <= $this->endRow && $this->currentRow >=
$this->startRow;
172 if ($this->onlyExistingCells) {
174 (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) &&
175 ($this->startRow <= $this->endRow)
180 (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) &&
181 ($this->endRow >= $this->startRow)
resetStart(int $startRow=1)
(Re)Set the start row and the current row pointer.
resetEnd($endRow=null)
(Re)Set the end row.
key()
Return the current iterator key.
adjustForExistingOnlyRange()
Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary.
prev()
Set the iterator to its previous value.
__construct(?Worksheet $subject=null, $columnIndex='A', $startRow=1, $endRow=null)
Create a new row iterator.
seek(int $row=1)
Set the row pointer to the selected row.
next()
Set the iterator to its next value.
rewind()
Rewind the iterator to the starting row.
current()
Return the current cell in this worksheet column.
static columnIndexFromString($pString)
Column index from string.
valid()
Indicate if more rows exist in the worksheet range of rows that we're iterating.