Format cells
Set the number format, font, fill, alignment, wrapping and borders of a range or the selection; only the options given change, the rest of each cell's format stays.
Command in the Excel toolkit · id ooa.excel/format_cells · 15 inputs, 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Range | String | No | Cell or range to format; when empty, the range chosen by select_range or the cell chosen by go_to_cell. | |
| Number format | String | No | Excel number format, e.g. #,##0.00, 0%, dd/mm/yyyy, @ for text or General. | |
| Bold | Boolean | No | Bold on or off; unchanged when empty. | |
| Italic | Boolean | No | Italic on or off; unchanged when empty. | |
| Underline | Boolean | No | Single underline on or off; unchanged when empty. | |
| Font name | String | No | Font name; unchanged when empty. | |
| Font size | Number | No | Font size in points; unchanged when empty. | |
| Font color | String | No | Text colour: hex (#C00000), red,green,blue numbers or a name such as dark red; unchanged when empty. .xlsx only. | |
| Fill color | String | No | Solid background colour, as for font_color; none removes the fill; unchanged when empty. .xlsx only. | |
| Horizontal | String | No | Horizontal alignment; unchanged when empty. | |
| Vertical | String | No | Vertical alignment; unchanged when empty. | |
| Wrap text | Boolean | No | Wrap long text onto several lines; unchanged when empty. | |
| Borders | String | No | all draws thin lines around every cell; outline only around the range; none removes the lines; unchanged when empty. | |
| Sheet | String | No | Sheet name; active sheet when empty. | |
| Session | String | No | excel | Workbook session. |
Outputs
| Output | Type | What it is |
|---|---|---|
| count | Number | Number of cells formatted. |