-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I found an issue when writing an hyperlink formula (writeFormula) after upgrading the openxlsx from 4.2.3 -> 4.2.4.
To Reproduce
Here is an example code:
library(dplyr)
library(openxlsx)
channels <- tribble(
~channel, ~homepage,
"ABC", "https://www.abc.net.au/",
"BBC", "https://www.bbc.com/",
"CBC", "https://www.cbc.ca/"
)
channels <- channels |>
mutate(formula = paste0(
'=HYPERLINK("',
homepage,
'", "',
channel,
'")')
)
wb <- createWorkbook()
addWorksheet(wb, "channels")
writeDataTable(wb, "channels", channels, tableName = "channels")
writeFormula(wb, "channels", channels$formula, startRow = 2, startCol = 1)
freezePane(wb, "channels", firstRow = TRUE)
setColWidths(wb, "channels", cols = 1:ncol(channels), widths = "auto")
saveWorkbook(wb, file = here::here("temp", "channels.xlsx"), overwrite = TRUE)
Screenshots
screenshot when using 4.2.3 (desired outcome):
screenshot when using 4.2.4
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

