# \donttest{
if (interactive()) {
xlsxFile <- system.file("extdata", "readTest.xlsx", package = "openxlsx2")
xl_open(xlsxFile)
# (not yet saved) Workbook example
wb <- wb_workbook()
x <- mtcars[1:6, ]
wb$add_worksheet("Cars")
wb$add_data("Cars", x, startCol = 2, startRow = 3, rowNames = TRUE)
xl_open(wb)
}
# }
Run the code above in your browser using DataLab