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