code: protected function adjustForExistingOnlyRange()
      {
          if ($this->onlyExistingCells) {
              while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) &&
                  ($this->startRow <= $this->endRow)) {
                  ++$this->startRow;
              }
              if ($this->startRow > $this->endRow) {
                  throw new PhpSpreadsheetException('No cells exist within the specified range');
              }
              while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) &&
                  ($this->endRow >= $this->startRow)) {
                  --$this->endRow;
              }
              if ($this->endRow < $this->startRow) {
                  throw new PhpSpreadsheetException('No cells exist within the specified range');
              }
          }
      }
docs: Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary.
  
  @throws PhpSpreadsheetException