modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Function parseFormula

    • Parse an Excel formula string into a typed AST.

      Tokenizes the input first, then builds the AST via recursive descent. Errors from both the tokenizer and parser are collected in errors. A body (the text after an optional leading =) longer than 8192 characters is not tokenized: the result is { ast: null, errors: ['Formula exceeds 8192 characters'] }.

      Parameters

      • formula: string

        Formula string, optionally starting with =.

      Returns ParseResult

      Parse result with AST and collected errors.