{"record":{"id":"2e3b7ef3bea22954","repo":"PHPOffice/PhpSpreadsheet","slug":"invalid-column-index-columnindex","errorCode":null,"errorMessage":"Invalid column index $columnIndex","messagePattern":"Invalid column index \\$columnIndex","errorType":"exception","errorClass":"PhpOffice\\PhpSpreadsheet\\Exception","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Cell/Coordinate.php","lineNumber":469,"sourceCode":"    }\n\n    private const LOOKUP_CACHE = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n    /**\n     * String from column index.\n     *\n     * @param int|numeric-string $columnIndex Column index (A = 1)\n     */\n    public static function stringFromColumnIndex(int|string $columnIndex, bool $tolerateZero = false): string\n    {\n        /** @var string[] */\n        static $indexCache = [];\n        $columnIndex2 = (int) $columnIndex;\n        if ($columnIndex2 === 0 && $tolerateZero) {\n            return '';\n        }\n        if ($columnIndex2 < 1 || $columnIndex2 > AddressRange::MAX_COLUMN_INT) {\n            throw new Exception(\"Invalid column index $columnIndex\");\n        }\n\n        $columnIndex = $columnIndex2;\n        if (!isset($indexCache[$columnIndex])) {\n            $indexValue = $columnIndex;\n            $base26 = '';\n            do {\n                $characterValue = ($indexValue % 26) ?: 26;\n                $indexValue = ($indexValue - $characterValue) / 26;\n                $base26 = self::LOOKUP_CACHE[$characterValue] . $base26;\n            } while ($indexValue > 0);\n            $indexCache[$columnIndex] = $base26;\n        }\n\n        return $indexCache[$columnIndex];\n    }\n\n    /**","sourceCodeStart":451,"sourceCodeEnd":487,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Cell/Coordinate.php#L451-L487","documentation":"Error \"Invalid column index $columnIndex\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Cell/Coordinate.php:469 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"}