{"record":{"id":"a655f898269271a8","repo":"PHPOffice/PhpSpreadsheet","slug":"start-row-startrow-is-beyond-highest-row-t","errorCode":null,"errorMessage":"Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})","messagePattern":"Start row \\((.+?)\\) is beyond highest row \\((.+?)\\)","errorType":"exception","errorClass":"PhpOffice\\PhpSpreadsheet\\Exception","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Worksheet/RowIterator.php","lineNumber":63,"sourceCode":"        $this->resetStart($startRow);\n    }\n\n    public function __destruct()\n    {\n        unset($this->subject);\n    }\n\n    /**\n     * (Re)Set the start row and the current row pointer.\n     *\n     * @param int $startRow The row number at which to start iterating\n     *\n     * @return $this\n     */\n    public function resetStart(int $startRow = 1): static\n    {\n        if ($startRow > $this->subject->getHighestRow()) {\n            throw new PhpSpreadsheetException(\n                \"Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})\"\n            );\n        }\n\n        $this->startRow = $startRow;\n        if ($this->endRow < $this->startRow) {\n            $this->endRow = $this->startRow;\n        }\n        $this->seek($startRow);\n\n        return $this;\n    }\n\n    /**\n     * (Re)Set the end row.\n     *\n     * @param ?int $endRow The row number at which to stop iterating\n     *","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Worksheet/RowIterator.php#L45-L81","documentation":"Error \"Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Worksheet/RowIterator.php:63 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"}