# formatNumber

Source: /xlsx-format/api-reference/functions/formatnumber

Format a numeric value using an Excel number format string or format index.

This is the main entry point for the SSF engine. It resolves the format string
(from index or direct string), selects the appropriate section for the value's
sign, and delegates to the tokenizer/renderer (` eval_fmt `).

```ts
formatNumber(fmt: string | number, value: any, options?: any): string
```

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| ` fmt ` | ` string \| number ` | Yes | Format string (e.g. "#,##0.00") or format index (e.g. 14 for "m/d/yy") |
| ` value ` | ` any ` | Yes | The value to format (number, string, boolean, Date, etc.) |
| ` options ` | ` any ` | No | Formatting options: date1904, dateNF (date format override), table (custom format table) |

## Returns

` string `

Formatted string representation
