Format Range
format_rangeApply formatting to a cell or range in an open Excel workbook, setting font, fill, number format, and alignment individually. Only specified properties are changed.
Instructions
Apply font, fill, number-format, and alignment to a cell or range.
Only arguments that are explicitly set are changed; everything else is left as-is.
Args: workbook: Workbook name or path (None = active workbook). sheet: Worksheet name (None = active sheet). range_address: A1-style address, e.g. "A1:C1". bold, italic, underline: Font style toggles. font_name: e.g. "Calibri". font_size: Point size. font_color: Hex RGB, e.g. "FF0000" (with or without leading '#'). fill_color: Hex RGB cell background color. number_format: Excel number format code, e.g. "$#,##0.00" or "0.0%". horizontal_align: One of "left", "center", "right", "general". wrap_text: Whether to wrap text within the cell.
Returns: JSON confirmation of the range formatted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| sheet | No | ||
| italic | No | ||
| workbook | No | ||
| font_name | No | ||
| font_size | No | ||
| underline | No | ||
| wrap_text | No | ||
| fill_color | No | ||
| font_color | No | ||
| number_format | No | ||
| range_address | No | A1 | |
| horizontal_align | No |