Function formatFormula

  • The canonical text of a formula AST (without =): functions and references in capitals, , between arguments, texts with "" for a quotation mark, parentheses only where needed. Used for moving formulas and the Excel export.

    Parameters

    Returns string

    the formula text

    Example

    formatFormula({ kind: "binary", op: "*", left: { kind: "ref", row: 1, col: 1, absRow: false, absCol: false },
    right: { kind: "literal", value: 2 } }); // "B2*2"

    Since

    1.1.99