protected function PHPExcel_Worksheet_RowCellIterator::adjustForExistingOnlyRange in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowCellIterator.php \PHPExcel_Worksheet_RowCellIterator::adjustForExistingOnlyRange()
* Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary *
Throws
Overrides PHPExcel_Worksheet_CellIterator::adjustForExistingOnlyRange
2 calls to PHPExcel_Worksheet_RowCellIterator::adjustForExistingOnlyRange()
- PHPExcel_Worksheet_RowCellIterator::resetEnd in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ RowCellIterator.php - * (Re)Set the end column * *
- PHPExcel_Worksheet_RowCellIterator::resetStart in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ RowCellIterator.php - * (Re)Set the start column and the current column pointer * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet/ RowCellIterator.php, line 205
Class
- PHPExcel_Worksheet_RowCellIterator
- PHPExcel_Worksheet_RowCellIterator
Code
protected function adjustForExistingOnlyRange() {
if ($this->_onlyExistingCells) {
while (!$this->_subject
->cellExistsByColumnAndRow($this->_startColumn, $this->_rowIndex) && $this->_startColumn <= $this->_endColumn) {
++$this->_startColumn;
}
if ($this->_startColumn > $this->_endColumn) {
throw new PHPExcel_Exception('No cells exist within the specified range');
}
while (!$this->_subject
->cellExistsByColumnAndRow($this->_endColumn, $this->_rowIndex) && $this->_endColumn >= $this->_startColumn) {
--$this->_endColumn;
}
if ($this->_endColumn < $this->_startColumn) {
throw new PHPExcel_Exception('No cells exist within the specified range');
}
}
}