Skip to contents

get and set cell style

Usage

wb_get_cell_style(wb, sheet = current_sheet(), dims)

wb_set_cell_style(wb, sheet = current_sheet(), dims, style)

Arguments

wb

wb

sheet

sheet

dims

dims

style

style

Value

wb_get_cell_style returns the style id as character

wb_set_cell_style returns the workbook invisible

Examples

# set a style in b1
wb <- wb_workbook()$add_worksheet()$
  add_numfmt(dims = "B1", numfmt = "#,0")

# get style from b1 to assign it to a1
numfmt <- wb$get_cell_style(dims = "B1")

# assign style to a1
wb$set_cell_style(dims = "A1", style = numfmt)