Numbers: set number format
numbers_set_number_formatSet how numbers display in a range of a Numbers file (currency, percentage, datetime) without changing the values. Preview changes with dry_run.
Instructions
How numbers display in a range ("B2:B9"): format = number | currency | percentage | scientific | fraction | datetime | text. Options: decimal_places, thousands_separator, negative_style (minus|red|parentheses|red_parentheses), currency_code (ISO, e.g. SAR, USD), accounting, date_format (e.g. "d MMM yyyy"). Values are not changed; the result shows how each cell now displays. dry_run=true previews the change on a copy without touching the file. Use for how numbers display (currency, %, dates, decimals); the values don't change. For fonts and colours use numbers_set_cell_style.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .numbers file (absolute, or starting with ~). | |
| cells | Yes | A cell or range in A1 notation, e.g. "B2" or "A1:D1". | |
| sheet | No | Sheet name. Omit when the file has one sheet (iwork_read lists sheets and tables). | |
| table | No | Table name on that sheet. Omit when the sheet has one table. | |
| format | Yes | number | currency | percentage | scientific | fraction | datetime | text. | |
| dry_run | No | true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user. | |
| accounting | No | true = accounting style (symbol aligned left) for currency. | |
| date_format | No | Date pattern for format=datetime, e.g. "d MMM yyyy". | |
| currency_code | No | ISO currency code for format=currency, e.g. "SAR" or "USD". | |
| decimal_places | No | Digits after the decimal point. | |
| negative_style | No | minus | red | parentheses | red_parentheses. | |
| thousands_separator | No | true = group thousands (1,234). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||