#' Write tables into xlsx files #' #' @param file The xlsx file #' @param ... Pairs of table and values #' @export write2Xlsx <- function(file, ...) tbls <- list(...) sheet_name <- names(tbls) newWB <- XLConnect::loadWorkbook(filename = file, create = TRUE) for(i in seq(along = tbls)) XLConnect::createSheet(newWB, name = sheet_name[i]) writeWorksheet( newWB, data = as.data.frame(tbls[[i]]), sheet = sheet_name[i], header = TRUE, rownames = NULL) saveWorkbook(newWB) System based file path

system_file(file, package)

Arguments

file

The filename

package

Package name