{"record":{"id":"55e140739fdfeb8e","repo":"PHPOffice/PhpSpreadsheet","slug":"in-iterateonlyexistingcells-mode-and-cell-does-n-55e140","errorCode":null,"errorMessage":"In \"IterateOnlyExistingCells\" mode and Cell does not exist","messagePattern":"In \"IterateOnlyExistingCells\" mode and Cell does not exist","errorType":"exception","errorClass":"PhpOffice\\PhpSpreadsheet\\Exception","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Worksheet/RowCellIterator.php","lineNumber":96,"sourceCode":"        $endColumn = $endColumn ?: $this->worksheet->getHighestColumn();\n        $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn);\n        $this->adjustForExistingOnlyRange();\n\n        return $this;\n    }\n\n    /**\n     * Set the column pointer to the selected column.\n     *\n     * @param string $column The column address to set the current pointer at\n     *\n     * @return $this\n     */\n    public function seek(string $column = 'A'): static\n    {\n        $columnId = Coordinate::columnIndexFromString($column);\n        if ($this->onlyExistingCells && !($this->cellCollection->has($column . $this->rowIndex))) {\n            throw new PhpSpreadsheetException('In \"IterateOnlyExistingCells\" mode and Cell does not exist');\n        }\n        if (($columnId < $this->startColumnIndex) || ($columnId > $this->endColumnIndex)) {\n            throw new PhpSpreadsheetException(\"Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})\");\n        }\n        $this->currentColumnIndex = $columnId;\n\n        return $this;\n    }\n\n    /**\n     * Rewind the iterator to the starting column.\n     */\n    public function rewind(): void\n    {\n        $this->currentColumnIndex = $this->startColumnIndex;\n    }\n\n    /**","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Worksheet/RowCellIterator.php#L78-L114","documentation":"Error \"In \"IterateOnlyExistingCells\" mode and Cell does not exist\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Worksheet/RowCellIterator.php:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"65b080eef4d9fd11a5796135ab145883e5c3d6a6","analyzedAt":"2026-08-17T05:40:41.646Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}