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

    Function truncateNumberText

    • Applies Excel's entry rule to numeric text: every significand digit past the 15th becomes 0, so the text parses to the double Excel would store.

      Parameters

      • text: string

        Numeric text in any accepted form — signed, grouped, percent, currency-affixed, or scientific. The scan is locale-blind: only digit characters count toward significance (separators pass through untouched), leading zeros carry none, and the scan stops at an exponent marker so E5 keeps its magnitude. Excess digits are zeroed rather than dropped so the text's shape (decimal places, grouping) survives for format inference.

      Returns string

      Callers apply this to every text→number path and to nothing else. It is truncation, not rounding: 1234567890.123456789 stores …345, never …346.