wb <- wb_workbook() %>%
wb_add_worksheet("S1") %>%
wb_add_data("S1", x = mtcars)
wb %>%
wb_add_cell_style(
dims = "A1:K1",
text_rotation = "45",
horizontal = "center",
vertical = "center",
wrap_text = "1"
)
# Chaining
wb <- wb_workbook()$add_worksheet("S1")$add_data(x = mtcars)
wb$add_cell_style(dims = "A1:K1",
text_rotation = "45",
horizontal = "center",
vertical = "center",
wrap_text = "1")
Run the code above in your browser using DataLab