Add a new sheet to a workbook with data
xlsxAddSheet.RdThis function wraps `openxlsx::addWorksheet` and adds data to the newly created sheet. If the sheet already exists, it issues a warning and clears the existing content.
See also
Other function to read from and write to xlsx:
setHeadersToLowerCase(),
splitInputs(),
xlsxAddDataUsingTemplate(),
xlsxCloneAndSet(),
xlsxReadData(),
xlsxWriteData()
Examples
if (FALSE) { # \dontrun{
library(openxlsx)
wb <- loadWorkbook("example.xlsx")
data <- data.table(Name = c("Alice", "Bob"), Age = c(30, 25))
xlsxAddSheet(wb, "NewSheet", data)
} # }