{"record":{"id":"396c6d044e09e12a","repo":"PHPOffice/PhpSpreadsheet","slug":"invalid-range-cellblock","errorCode":null,"errorMessage":"Invalid range: \"{$cellBlock}\"","messagePattern":"Invalid range: \"(.+?)\"","errorType":"exception","errorClass":"PhpOffice\\PhpSpreadsheet\\Exception","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Cell/Coordinate.php","lineNumber":787,"sourceCode":"        // split range sets on intersection (space) or union (,) operators\n        $tokens = preg_split('/([ ,])/', $rangeString, -1, PREG_SPLIT_DELIM_CAPTURE) ?: [];\n        $split = array_chunk($tokens, 2);\n        $ranges = array_column($split, 0);\n        $operators = array_column($split, 1);\n\n        return [$ranges, $operators];\n    }\n\n    /**\n     * Check that the given range is valid, i.e. that the start column and row are not greater than the end column and\n     * row.\n     *\n     * @param string $cellBlock The original range, for displaying a meaningful error message\n     */\n    private static function validateRange(string $cellBlock, int $startColumnIndex, int $endColumnIndex, int $currentRow, int $endRow): void\n    {\n        if ($startColumnIndex >= $endColumnIndex || $currentRow > $endRow) {\n            throw new Exception('Invalid range: \"' . $cellBlock . '\"');\n        }\n    }\n}\n","sourceCodeStart":769,"sourceCodeEnd":791,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Cell/Coordinate.php#L769-L791","documentation":"Error \"Invalid range: \"{$cellBlock}\"\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Cell/Coordinate.php:787 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"}