You are here

public function PHPExcel_Worksheet_ColumnCellIterator::prev in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnCellIterator.php \PHPExcel_Worksheet_ColumnCellIterator::prev()

* Set the iterator to its previous value

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnCellIterator.php, line 170

Class

PHPExcel_Worksheet_ColumnCellIterator
PHPExcel_Worksheet_ColumnCellIterator

Code

public function prev() {
  if ($this->_position <= $this->_startRow) {
    throw new PHPExcel_Exception("Row is already at the beginning of range ({$this->_startRow} - {$this->_endRow})");
  }
  do {
    --$this->_position;
  } while ($this->_onlyExistingCells && !$this->_subject
    ->cellExistsByColumnAndRow($this->_columnIndex, $this->_position) && $this->_position >= $this->_startRow);
}