Skip to main content

Format Cells

Excel·v1.11.1
ExcelFormattingWrites files

Set fill, font, borders, alignment, number format and size on a range. Every field is optional and only the ones filled in are changed

Inputs

NameTypeRequiredDefaultDescription
Excel Instance
excelInstance
variableRequiredNot set
Sheet Name
sheetName
stringOptionalNot setLeave empty for the first sheet
Range
range
stringOptionalNot setA1:D20, a single cell, whole columns A:C, or empty for everything on the sheet
Fill Colour
fillColor
stringOptionalNot setHex such as #4472C4, or a name such as light green
Font Colour
fontColor
stringOptionalNot set
Font
fontName
stringOptionalNot setCalibri, Arial, Georgia
Font Size
fontSize
numberOptionalNot set
Bold
bold
booleanOptionalNot set
Italic
italic
booleanOptionalNot set
Underline
underline
booleanOptionalNot set
Horizontal Alignment
horizontalAlignment
enumOptionalNot set
leftcenterrightjustifyfill
Vertical Alignment
verticalAlignment
enumOptionalNot set
topmiddlebottom
Wrap Text
wrapText
booleanOptionalNot set
Indent
indent
numberOptionalNot set
Text Rotation
textRotation
numberOptionalNot setDegrees, -90 to 90
Number Format
numberFormat
enumOptionalNot set
generalnumbernumber2thousandscurrencypercentpercent2datedatetimetimetextcustom
Currency Symbol
currencySymbol
stringOptional$
Shown when numberFormat = currency
Custom Format Code
customNumberFormat
stringOptionalNot setSuch as #,##0.00 or dd-mmm-yyyy
Shown when numberFormat = custom
Border Style
borderStyle
enumOptionalNot set
nonethinmediumthickdotteddasheddouble
Border Colour
borderColor
stringOptionalNot set
Shown when borderStyle = thin / medium / thick / dotted / dashed / double
Border Edges
borderEdges
enumOptionalall
alloutlinetopbottomleftright
Shown when borderStyle = none / thin / medium / thick / dotted / dashed / double
Column Width
columnWidth
numberOptionalNot set
Row Height
rowHeight
numberOptionalNot set

Compatibility

WindowsLinuxAttendedUnattended

Related activities