cond_format.Rd
This function is a wrapper for openxlsx::conditionalFormatting()
allowing for a more convenient application of conditional formatting to a sheet in a Workbook object. The arguments colourScale
, contains
and expression
serve as shortcuts to obtaining the respective conditional formatting, but it is still possible to obtain all possible conditional formatting styles available in openxlsx via the arguments rule
, style
and type
which are directly passed to openxlsx::conditionalFormatting()
.
cond_format(
wb,
sheetName = NULL,
columns,
colourScale = NULL,
contains = NULL,
expression = NULL,
type = NULL,
rule = NULL,
style = openxlsx::createStyle(fontColour = "white", bgFill = "#ad0000"),
...
)
a Workbook object
a name or index of a worksheet
column names or indices to apply conditional formatting to
shortcut argument to apply "colourScale" formatting, e.g. c("red" = 0, "grey" = 50, "green" = 100)
shortcut argument to apply "contains" formatting, e.g. "word"
shortcut argument to apply "expression" formatting, e.g. ">=50"
directly passed to openxlsx::conditionalFormatting()
directly passed to openxlsx::conditionalFormatting()
directly passed to openxlsx::conditionalFormatting()
. By default, cells will have a red fill and white font color.
directly passed to openxlsx::conditionalFormatting()