SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function parseFormulaLiteral

    • Parses formula text that is exactly ONE literal — a number (optionally signed), a quoted string, TRUE/FALSE, or an error label — to its value.

      Parameters

      • text: string

        The formula text, without a leading =.

      Returns Scalar | undefined

      The literal's value, or undefined when the text is anything else — a reference, a function call, an expression, or text that does not lex at all.

      Backed by the calculation compiler's own lexer and literal actions (canonical locale: . decimal, English booleans, canonical error labels), so what counts as a literal here is exactly what counts as one in a formula. The IO borders use this to fold OOXML <formula> operands (cellIs / data-validation bounds) into condition params — a parallel grammar that drifted from the compiler's would corrupt exactly the operands it was meant to preserve.