/** Maximum column index Excel accepts (XFD). */ export declare const MAX_COL = 16384; /** Maximum row index Excel accepts. */ export declare const MAX_ROW = 1048576; /** * 1-based column index → spreadsheet column letter ("A", "Z", "AA", "XFD"). * Throws OpenXmlSchemaError when out of range. */ export declare function columnLetterFromIndex(n: number): string; /** * Column letter → 1-based column index. Case-insensitive but at most 3 letters * (the spec ceiling). Throws on empty / non-A-Z / over-range. */ export declare function columnIndexFromLetter(letter: string): number; /** A single-cell coordinate split into its letter and 1-based row. */ export interface CellCoordinate { column: string; row: number; } /** A single-cell coordinate split into 1-based numeric (col, row). */ export interface CellCoordinateNumeric { col: number; row: number; } /** A 1-based rectangular boundary. */ export interface CellRangeBoundaries { minCol: number; minRow: number; maxCol: number; maxRow: number; } /** * Parse a single-cell coordinate string ("A1", "$XFD$1048576") into its column * letter (always uppercased) and 1-based row. */ export declare function coordinateFromString(coord: string): CellCoordinate; /** * Same as {@link coordinateFromString} but returning the column as its 1-based * numeric index. Thin convenience for the worksheet read path. */ export declare function coordinateToTuple(coord: string): CellCoordinateNumeric; /** Compose `"A1"` from a 1-based (col, row). */ export declare function tupleToCoordinate(col: number, row: number): string; /** * Predicate: true iff `s` is a valid single-cell A1 coordinate (`"A1"`, * `"XFD1048576"`). Strings with `$` absolute markers, surrounding whitespace, * ranges (`A1:B2`), or out-of-bound row / column return false. Useful for * sanitising user input before passing to {@link coordinateToTuple} or * `setCellByCoord`. */ export declare function isValidCellRef(s: unknown): s is string; /** * Predicate: true iff `s` is a valid A1-style range expression — single cell, * two-corner range, whole column (`A:A`), or whole row (`1:1`). `$` markers, * whitespace, and out-of-bound bounds fail. Sanity-check before {@link * rangeBoundaries} / `parseRange`. */ export declare function isValidRangeRef(s: unknown): s is string; /** * Predicate: true iff `s` is a valid 1..3-char column letter (`"A"` through * `"XFD"`, case-insensitive). Empty / over-long / out-of-bound / non-string * fails. */ export declare function isValidColumnLetter(s: unknown): s is string; /** * Predicate: true iff `n` is a valid 1-based row index in `[1, 1048576]`. * Non-finite / non-integer / out-of-bound fails. */ export declare function isValidRowNumber(n: unknown): n is number; /** * Predicate: true iff `n` is a valid 1-based column index in `[1, 16384]`. * Non-finite / non-integer / out-of-bound fails. */ export declare function isValidColumnNumber(n: unknown): n is number; /** * Parse "A1:B5" / "A:A" / "1:1" / single-cell into 1-based (minCol, minRow, * maxCol, maxRow). Whole-column ranges fill rows to [1, MAX_ROW]; whole-row * ranges fill cols to [1, MAX_COL]. */ export declare function rangeBoundaries(range: string): CellRangeBoundaries; /** Inverse of {@link rangeBoundaries} for the rectangular case. */ export declare function boundariesToRangeString(b: CellRangeBoundaries): string; /** * Parse a sheet-qualified range ("Sheet1!A1:B5" / "'Quarter 1'!A1"). Sheet * names with single quotes inside use SQL-style doubling ("'Bob''s Sheet'!A1") * — we unescape on the way out. */ export declare function parseSheetRange(input: string): { sheet: string; range: string; bounds: CellRangeBoundaries; }; /** * Inverse of {@link parseSheetRange}: format a sheet title + range (or * single-cell ref) as `Sheet1!A1` or `'Quarter 1'!A1` per Excel's * sheet-qualified syntax. Single quotes inside the title are escaped by * doubling (`'Bob''s Sheet'`). * * Quoting rule: sheet titles consisting only of `[A-Za-z_][A-Za-z0-9_]*` are * emitted bare; everything else (spaces, digits-leading, hyphens, apostrophes, * punctuation…) gets wrapped in single quotes. */ export declare function formatSheetQualifiedRef(sheet: string, ref: string): string;