# 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)
Run the code above in your browser using DataLab