You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An unintended change in release 1.9 requires the user to specify a cell for each formula passed to wb_add_formula(). The workaround is to specify the dimensions where the formula is supposed to be written to, ahead of the formula.
library(openxlsx2)
packageVersion("openxlsx2")
#> [1] '1.9'fml<- c("SUM(A2:B2)", "SUM(A3:B3)")
# broken, used to workwb<- wb_workbook()$
add_worksheet()$
add_data(x=matrix(1:4, 2, 2))$
add_formula(dims="C2",
x=fml)
#> Error in `[<-.data.frame`(`*tmp*`, , value = c("SUM(A2:B2)", "SUM(A3:B3)": replacement has 2 rows, data has 1# workaroundwb<- wb_workbook()$
add_worksheet()$
add_data(x=matrix(1:4, 2, 2))$
add_formula(dims= wb_dims(x=fml, from_dims="C2"),
x=fml)
if (interactive()) wb$open()
The text was updated successfully, but these errors were encountered:
An unintended change in release 1.9 requires the user to specify a cell for each formula passed to
wb_add_formula()
. The workaround is to specify the dimensions where the formula is supposed to be written to, ahead of the formula.The text was updated successfully, but these errors were encountered: