Format range
Set fill, font, alignment, wrapping, size, borders, merging and number format of a range; empty settings are left as they are.
Command in the Microsoft 365 toolkit · id ooa.microsoft365/excel_format_range · 23 inputs (1 required), no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | No | Microsoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Remote path | String | No | Workbook path in the drive (e.g. Finance/budget.xlsx), or id:{item-id}. | |
| Sheet | String | No | Worksheet name. | |
| Range | String | Yes | Range address. | |
| Fill color | String | No | Background colour as #RRGGBB or a colour name. | |
| Bold | Boolean | No | Make the text bold (true) or normal (false). | |
| Font color | String | No | Text colour as #RRGGBB or a colour name. | |
| Number format | String | No | Excel number format code for every cell. | |
| Italic | Boolean | No | Italic on or off; unchanged when empty. | |
| Underline | Boolean | No | Single underline on or off; unchanged when empty. | |
| Strikethrough | Boolean | No | Strikethrough 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. | |
| Horizontal alignment | String | No | Horizontal alignment; unchanged when empty. | |
| Vertical alignment | String | No | Vertical alignment; unchanged when empty. | |
| Wrap text | Boolean | No | Wrap text in the cells on or off; unchanged when empty. | |
| Column width | Number | No | Column width in points; unchanged when empty. | |
| Row height | Number | No | Row height in points; unchanged when empty. | |
| Border style | String | No | Line style of every border of the range, inside and out; unchanged when empty. | |
| Border color | String | No | Colour of those borders. | |
| Merge | Boolean | No | Merge the cells (true) or unmerge them (false); unchanged when empty. | |
| Drive | String | No | me/drive | Whose files: me/drive (your OneDrive), a person (ann@acme.com), a SharePoint site (contoso.sharepoint.com:/sites/Finance), a library of a site by name (contoso.sharepoint.com:/sites/Finance:/Invoices), or sites/{site-id}/drive or drives/{drive-id}. With an app sign-in, name a person or site. |
| Endpoint address | String | No | https://graph.microsoft.com/v1.0 | Graph endpoint; change only for national clouds or testing. |