Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
protected function adjustForExistingOnlyRange()
    {
        if ($this->onlyExistingCells) {
            while ((!$this->worksheet->cellExistsByColumnAndRow($this->startColumnIndex, $this->rowIndex)) && ($this->startColumnIndex <= $this->endColumnIndex)) {
                ++$this->startColumnIndex;
            }
            if ($this->startColumnIndex > $this->endColumnIndex) {
                throw new PhpSpreadsheetException('No cells exist within the specified range');
            }
            while ((!$this->worksheet->cellExistsByColumnAndRow($this->endColumnIndex, $this->rowIndex)) && ($this->endColumnIndex >= $this->startColumnIndex)) {
                --$this->endColumnIndex;
            }
            if ($this->endColumnIndex < $this->startColumnIndex) {
                throw new PhpSpreadsheetException('No cells exist within the specified range');
            }
        }
    }
protected function adjustForExistingOnlyRange()
    {
        if ($this->onlyExistingCells) {
            while ((!$this->worksheet->cellExistsByColumnAndRow($this->startColumnIndex, $this->rowIndex)) && ($this->startColumnIndex <= $this->endColumnIndex)) {
                ++$this->startColumnIndex;
            }
            if ($this->startColumnIndex > $this->endColumnIndex) {
                throw new PhpSpreadsheetException('No cells exist within the specified range');
            }
            while ((!$this->worksheet->cellExistsByColumnAndRow($this->endColumnIndex, $this->rowIndex)) && ($this->endColumnIndex >= $this->startColumnIndex)) {
                --$this->endColumnIndex;
            }
            if ($this->endColumnIndex < $this->startColumnIndex) {
                throw new PhpSpreadsheetException('No cells exist within the specified range');
            }
        }
    }
Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary.

@throws PhpSpreadsheetException