Closed JanMarvin closed 1 month ago
library(openxlsx2) # create example data df <- data.frame( x = 1:3, y = 1:3, z = paste(paste0("A", 1:3 + 1L), paste0("B", 1:3 + 1L), sep = "+"), stringsAsFactors = FALSE ) class(df$z) <- c(class(df$z), "formula") # create workbook wb <- wb_workbook()$ add_worksheet()$ add_data(x = df) # read sheet 1 x <- wb_to_df(wb, show_formula = TRUE) # write sheet 2 wb$add_worksheet()$ add_data(x = x) if (interactive()) wb$open()