Learn R Programming

openxlsx2 (version 0.8)

wb_add_dxfs_style: add dxfs style These styles are used with conditional formatting and custom table styles

Description

add dxfs style These styles are used with conditional formatting and custom table styles

Usage

wb_add_dxfs_style(
  wb,
  name,
  font_name = NULL,
  font_size = NULL,
  font_color = NULL,
  num_fmt = NULL,
  border = NULL,
  border_color = wb_color(getOption("openxlsx2.borderColor", "black")),
  border_style = getOption("openxlsx2.borderStyle", "thin"),
  bg_fill = NULL,
  gradient_fill = NULL,
  text_bold = NULL,
  text_italic = NULL,
  text_underline = NULL,
  ...
)

Value

The wbWorkbookObject, invisibly

Arguments

wb

wbWorkbook

name

the style name

font_name

the font name

font_size

the font size

font_color

the font color (a wb_color() object)

num_fmt

the number format

border

logical if borders are applied

border_color

the border color

border_style

the border style

bg_fill

any background fill

gradient_fill

any gradient fill

text_bold

logical if text is bold

text_italic

logical if text is italic

text_underline

logical if text is underlined

...

additional arguments passed to create_dxfs_style()

Examples

Run this code
wb <- wb_workbook() %>%
  wb_add_worksheet() %>%
  wb_add_dxfs_style(
   name = "nay",
   font_color = wb_color(hex = "FF9C0006"),
   bgFill = wb_color(hex = "FFFFC7CE")
  )

Run the code above in your browser using DataLab