Description Usage Arguments Value Examples
open_xlsx will take a single data frame or a list of data frames, as well as a vector of worksheet names and a workbook name, to create or update an excel xlsx file with each data frame on a seperate worksheet within the file
1 2 |
nameVector |
a single string or a vector of strings |
tableList |
a single data frame or a list of data frames |
workBookName |
a string |
colNames |
a boolean; default = TRUE |
rowNames |
a boolean; default = FALSE |
loadWorkBook |
a boolean; default = FALSE |
replaceSheets |
a boolean; default = FALSE |
.xlsx file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Name the sheets
nameVec1 <- c("1", "2", "3")
nameVec2 <- c("4", "5", "6")
nameVec3 <- c("3", "5", "7")
a <- data.frame(1:3, 4:6, 7:9)
b <- data.frame(10:12, 13:15, 16:18)
tableList1 <- list(a, a, a)
tableList2 <- list(b, b, a)
open_xlsx("1", a, "test")
open_xlsx(nameVec1, tableList1, "test")
open_xlsx(nameVec2, tableList1, "test", loadWorkBook = TRUE)
open_xlsx(nameVec3, tableList2, "test", loadWorkBook = TRUE, replaceSheets = TRUE)
file.remove("test.xlsx")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.