set_number_format
Set the number format of a spreadsheet range using patterns like '#,##0' or '0.0%'. Preserves other formatting and supports dry run to preview changes.
Instructions
Set the number format of a range (e.g. '#,##0', '0.0%', 'yyyy-mm-dd').
Only numberFormat is touched — other formatting is preserved. Formatting changes are NOT rollback-capable (use Sheets version history).
Args: spreadsheet_id_or_url: Full Sheets URL or bare spreadsheet ID. sheet: Sheet name OR gid string. range: Bare A1 range without sheet prefix. pattern: Number format pattern string. type: One of TEXT/NUMBER/PERCENT/CURRENCY/DATE/TIME/DATE_TIME/SCIENTIFIC. dry_run: If true, return the execution plan without changing anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | NUMBER | |
| range | Yes | ||
| sheet | Yes | ||
| dry_run | No | ||
| pattern | Yes | ||
| spreadsheet_id_or_url | Yes |