Skip to main content

Module numfmt

Module numfmt 

Source
Expand description

Number format renderer: converts a (value, format_code) pair into display text.

Supports Excel built-in format IDs 0-49, custom numeric patterns (0, #, ,, ., %, E+), date/time patterns (y, m, d, h, s, AM/PM), multi-section formats (up to 4 sections separated by ;), color codes ([Red], [Blue], etc.), conditional sections ([>100]), text format (@), and fraction formats (# ?/?).

Functionsยง

builtin_format_code
Map a built-in number format ID (0-49) to its format code string.
format_number
Format a numeric value using the given format code string.
format_with_builtin
Format a numeric value using a built-in format ID. Returns None if the ID is not a recognized built-in format.