71 $this->_subject = $subject;
72 $this->_rowIndex = $rowIndex;
81 unset($this->_subject);
93 $this->_startColumn = $startColumnIndex;
108 $endColumn = ($endColumn) ? $endColumn : $this->_subject->getHighestColumn();
124 if (($column < $this->_startColumn) || (
$column > $this->_endColumn)) {
125 throw new PHPExcel_Exception(
"Column $column is out of range ({$this->_startColumn} - {$this->_endColumn})");
126 } elseif ($this->_onlyExistingCells && !($this->_subject->cellExistsByColumnAndRow(
$column, $this->_rowIndex))) {
127 throw new PHPExcel_Exception(
'In "IterateOnlyExistingCells" mode and Cell does not exist');
147 return $this->_subject->getCellByColumnAndRow($this->_position, $this->_rowIndex);
165 }
while (($this->_onlyExistingCells) &&
166 (!$this->_subject->cellExistsByColumnAndRow($this->_position, $this->_rowIndex)) &&
167 ($this->_position <= $this->_endColumn));
176 if ($this->_position <= $this->_startColumn) {
178 "Column is already at the beginning of range (" .
186 }
while (($this->_onlyExistingCells) &&
187 (!$this->_subject->cellExistsByColumnAndRow($this->_position, $this->_rowIndex)) &&
188 ($this->_position >= $this->_startColumn));
206 if ($this->_onlyExistingCells) {
207 while ((!$this->_subject->cellExistsByColumnAndRow($this->_startColumn, $this->_rowIndex)) &&
208 ($this->_startColumn <= $this->_endColumn)) {
211 if ($this->_startColumn > $this->_endColumn) {
214 while ((!$this->_subject->cellExistsByColumnAndRow($this->_endColumn, $this->_rowIndex)) &&
215 ($this->_endColumn >= $this->_startColumn)) {
218 if ($this->_endColumn < $this->_startColumn) {
An exception for terminatinating execution or to throw for unit testing.
static stringFromColumnIndex($pColumnIndex=0)
String from columnindex.
static columnIndexFromString($pString='A')
Column index from string.
rewind()
Rewind the iterator to the starting column.
valid()
Indicate if more columns exist in the worksheet range of columns that we're iterating.
__construct(PHPExcel_Worksheet $subject=null, $rowIndex=1, $startColumn='A', $endColumn=null)
key()
Return the current iterator key.
current()
Return the current cell in this worksheet row.
next()
Set the iterator to its next value.
resetStart($startColumn='A')
adjustForExistingOnlyRange()
resetEnd($endColumn=null)