Skip to main content

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​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
Remote pathStringNoWorkbook path in the drive (e.g. Finance/budget.xlsx), or id:{item-id}.
SheetStringNoWorksheet name.
RangeStringYesRange address.
Fill colorStringNoBackground colour as #RRGGBB or a colour name.
BoldBooleanNoMake the text bold (true) or normal (false).
Font colorStringNoText colour as #RRGGBB or a colour name.
Number formatStringNoExcel number format code for every cell.
ItalicBooleanNoItalic on or off; unchanged when empty.
UnderlineBooleanNoSingle underline on or off; unchanged when empty.
StrikethroughBooleanNoStrikethrough on or off; unchanged when empty.
Font nameStringNoFont name; unchanged when empty.
Font sizeNumberNoFont size in points; unchanged when empty.
Horizontal alignmentStringNoHorizontal alignment; unchanged when empty.
Vertical alignmentStringNoVertical alignment; unchanged when empty.
Wrap textBooleanNoWrap text in the cells on or off; unchanged when empty.
Column widthNumberNoColumn width in points; unchanged when empty.
Row heightNumberNoRow height in points; unchanged when empty.
Border styleStringNoLine style of every border of the range, inside and out; unchanged when empty.
Border colorStringNoColour of those borders.
MergeBooleanNoMerge the cells (true) or unmerge them (false); unchanged when empty.
DriveStringNome/driveWhose 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 addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.