Format Cells
format_cellsApply targeted formatting to Excel ranges while preserving existing style attributes. Configure number formats, fonts, fills, borders, and alignment using hex colors, with automatic backup and safe validation.
Instructions
Apply formatting to a range, merging onto the existing style so unspecified attributes are preserved. number_format is an Excel format code; font is {name, size, bold, italic, underline, strike, color}; fill is {color} or {pattern, fg, bg}; border is {style, color, sides}; alignment is {horizontal, vertical, wrap_text, text_rotation, indent}; colors are hex. Named styles and conditional formats: design pack. Hazard-gated (allow_loss overrides); auto-backup; atomic verified save. Refuses while open in Excel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | ||
| font | No | ||
| path | Yes | ||
| sheet | No | ||
| backup | No | ||
| border | No | ||
| location | Yes | ||
| alignment | No | ||
| allow_loss | No | ||
| verify_com | No | ||
| number_format | No |