wb_add_styles() extends openxlsx2::wb_add_style() by allowing the
addition of multiple styles as a named list.
Arguments
- wb
A wbWorkbook object.
- styles
Required. List or style xml character, created by a create_*() function. Passed to
styleargument ofopenxlsx2::wb_add_style().- style_names
Optional if styles is a named list.
Examples
wb <- openxlsx2::wb_workbook()
wb <- openxlsx2::wb_add_worksheet(wb)
style <- openxlsx2::create_dxfs_style(font_color = openxlsx2::wb_color(hex = "FF0000"))
wb_add_styles(wb, styles = style, style_names = "myred")
#> A Workbook object.
#>
#> Worksheets:
#> Sheets: Sheet 1
#> Write order: 1