format_cells
Format Excel ranges with fonts, fills, borders, alignment, and number formats while preserving existing style attributes. Safely saves with automatic backup and refuses edits while the workbook is open.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||