Excel Number Format String
Type Registry
Excel Number Format String
representation.file.excel_format Spreadsheet custom number format code that defines how values are displayed. Found in metadata, headers, or as literal strings in spreadsheet data exports. Uses format tokens: # (optional digit), 0 (required digit), comma grouping, percent, date/time codes (yyyy, mm, dd, h, m, s), and optional multi-section syntax (positive;negative;zero;text).
Domain representation›file
Casts to VARCHAR
Scope Universal
Try it
CLI
$ finetype infer -i "#,##0.00"
→ representation.file.excel_format DuckDB
Detect
SELECT finetype('#,##0.00');
-- → 'representation.file.excel_format' Cast expression
CAST({col} AS VARCHAR) Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'representation.file.excel_format'; JSON Schema
finetype schema representation.file.excel_format {
"$id": "https://noon.sh/schemas/representation.file.excel_format",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Spreadsheet custom number format code that defines how values are displayed. Found in metadata, headers, or as literal strings in spreadsheet data exports. Uses format tokens: # (optional digit), 0 (required digit), comma grouping, percent, date/time codes (yyyy, mm, dd, h, m, s), and optional multi-section syntax (positive;negative;zero;text).",
"examples": [
"#,##0.00",
"$#,##0.00",
"0.00%",
"mm/dd/yyyy",
"h:mm:ss AM/PM",
"0.00E+00"
],
"maxLength": 100,
"minLength": 2,
"pattern": "^[#0.,;\\[\\]$€£¥%EeAaPpMm/dDyYhHsS ?:\"\\-+()<>\\w]*$",
"title": "Excel Number Format String",
"type": "string"
} Examples
#,##0.00$#,##0.000.00%mm/dd/yyyyh:mm:ss AM/PM0.00E+00 Also known as
number_formatcell_formatformat_code