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

    Function encodeScalar

    • Encodes one bare Scalar — a value with no cell behind it.

      Parameters

      • value: Scalar

      Returns Encoded | null

      null for a blank value, matching encodeCell.

      The counterpart to encodeCell for the stateless value layer (IRange, Scalar[][]), where there is no cell to ask for text and therefore no number format to apply. That is the whole difference: 0.04 encodes as 0.04 here and as 4% through a cell that formats it. There is consequently no mode — this is what CellEncoding.Mode.Value produces for a cell, and the only form a bare value has.

      Everything above formatting is identical, because it is the same contract: the ' prefix on strings, TRUE/FALSE, error labels, blank elision.