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

    Function sheetToFormulae

    • Extract all cell values and formulas as an array of strings.

      Format: "A1=100" for values, "A3='SUM(A1:A2)" for formulas. String values are prefixed with ' to distinguish from numbers.

      Parameters

      • ws: Worksheet

        The Worksheet to extract from.

      Returns string[]

      An array of "REF=VALUE" strings.

      const formulae = sheetToFormulae(ws);
      // ['A1=100', "A2='Hello", "A3='SUM(A1:A2)"]