71 $this->_subject = $subject;
81 unset($this->_subject);
92 $this->_startRow = $startRow;
94 $this->
seek($startRow);
107 $this->_endRow = ($endRow) ? $endRow : $this->_subject->getHighestRow();
121 if (($row < $this->_startRow) || (
$row > $this->_endRow)) {
122 throw new PHPExcel_Exception(
"Row $row is out of range ({$this->_startRow} - {$this->_endRow})");
123 } elseif ($this->_onlyExistingCells && !($this->_subject->cellExistsByColumnAndRow($this->_columnIndex,
$row))) {
124 throw new PHPExcel_Exception(
'In "IterateOnlyExistingCells" mode and Cell does not exist');
126 $this->_position =
$row;
144 return $this->_subject->getCellByColumnAndRow($this->_columnIndex, $this->_position);
162 }
while (($this->_onlyExistingCells) &&
163 (!$this->_subject->cellExistsByColumnAndRow($this->_columnIndex, $this->_position)) &&
164 ($this->_position <= $this->_endRow));
171 if ($this->_position <= $this->_startRow) {
172 throw new PHPExcel_Exception(
"Row is already at the beginning of range ({$this->_startRow} - {$this->_endRow})");
177 }
while (($this->_onlyExistingCells) &&
178 (!$this->_subject->cellExistsByColumnAndRow($this->_columnIndex, $this->_position)) &&
179 ($this->_position >= $this->_startRow));
197 if ($this->_onlyExistingCells) {
198 while ((!$this->_subject->cellExistsByColumnAndRow($this->_columnIndex, $this->_startRow)) &&
199 ($this->_startRow <= $this->_endRow)) {
202 if ($this->_startRow > $this->_endRow) {
205 while ((!$this->_subject->cellExistsByColumnAndRow($this->_columnIndex, $this->_endRow)) &&
206 ($this->_endRow >= $this->_startRow)) {
209 if ($this->_endRow < $this->_startRow) {
An exception for terminatinating execution or to throw for unit testing.
static columnIndexFromString($pString='A')
Column index from string.
valid()
Indicate if more rows exist in the worksheet range of rows that we're iterating.
__construct(PHPExcel_Worksheet $subject=null, $columnIndex, $startRow=1, $endRow=null)
current()
Return the current cell in this worksheet column.
key()
Return the current iterator key.
prev()
Set the iterator to its previous value.
next()
Set the iterator to its next value.
adjustForExistingOnlyRange()
rewind()
Rewind the iterator to the starting row.