Here's my reprex
library(openxlsx2)
wb <- openxlsx2::wb_workbook()
openxlsx2::wb_add_worksheet(wb, "All Courses")
allLines = c("This is the first test",
"This is the second test",
"This is the third test")
openxlsx2::wb_add_data(wb, sheet = "All Courses", allLines, start_col = 1, start_row = 1)
openxlsx2::wb_save(wb, file = "C:/Temp/My xlsx2 Test.xlsx", overwrite = TRUE)
I reliably get the following error message when I run this code:
openxlsx2::wb_add_data(wb, sheet = "All Courses", allLines, start_col = 1, start_row = 1)
Error in wb$.__enclos_env__$private$get_sheet_index(sheet) :
Sheet name(s) not found: all courses
I can't figure out if this is a bug or if I am doing something wrong. Thanks in advance for your help
Thomas Philips
