Skip to content

Cell Formats & Widths ​

WARNING

formats and widths only work with type="xlsx".

formats maps a column letter to an Excel number format string. widths maps a column letter to a width in characters (supported from v1.0.26).

Formatted .xlsx

Common formats ​

FormatExample output
'0.00'123.46
'#,##0'50,000
'0.00%'75.00%
'"$"#,##0.00_);\\("$"#,##0.00\\)'$50,000.00
'yyyy-mm-dd'2024-03-15

Released under the MIT License.