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

    Function formatCellRich

    • Format a cell value and return rich result with color metadata. Supports conditional sections like [>100]#,##0;[<=100]0.00 and bracket color codes like [Red], [Color3].

      A string value is formatted as a number only when its trimmed text is a plain decimal number (' 12 ', '1e3'); any other text, and every string under General or @, is returned unchanged. Numbers under General or @ use Excel's General display (1e21 gives '1E+21').

      Parameters

      • value: string | number | boolean | null
      • format: string | number
      • Optionalopts: FormatCellOptions

      Returns FormatCellResult