/** * xlsx FORMULAS — A1 ↔ R1C1 conversion. * * OWNERSHIP: FORMULA agent (see ast.ts header). * * Both functions are thin compositions over the parser and serializer: * parse in one style, serialize in the other, same anchor. The AST's * absolute-coordinate model (ast.ts header) makes the conversion exact — * `$`-absolute axes convert to bare R1C1 numbers, relative axes to * bracketed offsets, and vice versa. * * Output is canonical user-facing text (clean function names, no * `_xlfn.` prefixes); the two functions are inverse of each other for * any canonical input with the same anchor. */ import type { CellAddress } from '../internal.js'; /** * Convert a formula from A1 to R1C1 text. `anchor` is the cell the * formula lives in ('D2' or {row, col}); a leading '=' in the input is * accepted and not re-emitted. Throws on invalid input (same errors as * `parseFormula`). * * ```ts * a1ToR1C1('SUM(B2:C2)', 'D2') // → 'SUM(RC[-2]:RC[-1])' * a1ToR1C1('$B$2', 'D2') // → 'R2C2' * ``` */ export declare function a1ToR1C1(formula: string, anchor: string | CellAddress): string; /** * Convert a formula from R1C1 to A1 text. `anchor` is the cell the * formula lives in. Throws when a relative offset lands outside the * sheet (e.g. R[-1] anchored at row 1). * * ```ts * r1c1ToA1('SUM(RC[-2]:RC[-1])', 'D2') // → 'SUM(B2:C2)' * ``` */ export declare function r1c1ToA1(formula: string, anchor: string | CellAddress): string; //# sourceMappingURL=refs.d.ts.map