View source: R/class-workbook-wrappers.R
wb_add_named_style | R Documentation |
Set the styling to a named style for a cell region. Use wb_add_cell_style()
to style a cell region with custom parameters.
A named style is the one in spreadsheet software, like "Normal", "Warning".
wb_add_named_style(
wb,
sheet = current_sheet(),
dims = "A1",
name = "Normal",
font_name = NULL,
font_size = NULL
)
wb |
A |
sheet |
A worksheet |
dims |
A cell range |
name |
The named style name. Builtin styles are |
font_name , font_size |
optional else the default of the theme |
The wbWorkbook
, invisibly
Other styles:
wb_add_border()
,
wb_add_cell_style()
,
wb_add_fill()
,
wb_add_font()
,
wb_add_numfmt()
,
wb_cell_style
wb <- wb_workbook()$add_worksheet()
name <- "Normal"
dims <- "A1"
wb$add_data(dims = dims, x = name)
name <- "Bad"
dims <- "B1"
wb$add_named_style(dims = dims, name = name)
wb$add_data(dims = dims, x = name)
name <- "Good"
dims <- "C1"
wb$add_named_style(dims = dims, name = name)
wb$add_data(dims = dims, x = name)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.