Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[styles] allow updates of font elements #1153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JanMarvin
Copy link
Owner

Related to this SO. If update = TRUE all non empty font elements will be overwritten. At the moment it is not possible to set a font element to missing. All elements are initialized with either "" or some value. Might need some additional thinking

library(openxlsx2)

wb <- wb_workbook() |>
  wb_add_worksheet() |>
  wb_add_data(x = letters) |>
  wb_add_font(dims = wb_dims(x = letters), name = "Calibri", size = 20) |>
  # updates only the font color
  wb_add_font(dims = wb_dims(x = letters), name = "", size = "", color = wb_color("orange"), update = TRUE)

if (interactive()) wb$open()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant