Format cells
xlide_format_cellsFormat Excel cell ranges by applying bold, fonts, fill colors, borders, alignment, number formats, or merging; only specified properties change, preserving other cell formatting.
Instructions
Changes how a range looks: bold and font, fill colour, borders, alignment, number format, and merging. Only what you pass is changed, so each cell keeps the rest of its own format and making a header row bold does not flatten the number formats under it. Colours are RRGGBB or AARRGGBB hex without a leading hash. A number format is an Excel format code such as '#,##0.00' or 'yyyy-mm-dd'; that code is also what decides whether a number is shown as a date. Works on .xlsx, .xlsm and .xlam.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | Bold on or off. | |
| merge | No | 'merge' joins the range into one cell, keeping only the top-left value. 'unmerge' splits it back. Empty leaves merging alone. | |
| sheet | Yes | Worksheet name, matched without case. | |
| italic | No | Italic on or off. | |
| strike | No | Strikethrough on or off. | |
| vertical | No | top, center, bottom, justify or distributed. | |
| file_path | Yes | Absolute path to the Excel file. | |
| font_name | No | Typeface, such as 'Calibri'. | |
| font_size | No | Points. 0 leaves it alone. | |
| underline | No | Single underline on or off. | |
| wrap_text | No | Wrap text in the cell. | |
| cell_range | Yes | A1-style range, such as A1:D1, or a single cell. | |
| fill_color | No | Solid background colour as hex. 'none' clears the fill back to no fill. | |
| font_color | No | Text colour as hex, such as 'FF0000'. | |
| horizontal | No | left, center, right, fill, justify or general. | |
| border_color | No | Border colour as hex. Defaults to automatic. | |
| border_style | No | Border on all four sides: thin, medium, thick, double, dotted, dashed, hair, or none to remove. | |
| number_format | No | Excel format code, such as '#,##0.00', '0%' or 'yyyy-mm-dd'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||