Description Usage Arguments Value Examples
Write a list of data frames into an excel file with each data frame in a new sheet and the list element name as its sheet name.
1 |
dfs |
A list of data frames (names in the list are the names of the sheets). |
fpath |
A character string representing path and filename of the output. |
rowNames |
A boolean indicating whether the first column of a table in every sheet contains row names of the table. |
colNames |
A boolean indicating whether the first line of a table in every sheet contains a header. |
Nothing. Writes out data frames into specified Excel file.
1 2 3 4 5 | df1 <- data.frame(A=c(1, 2), B=c(3, 4))
df2 <- data.frame(C=c(5, 6), D=c(7, 8))
xlsx_fpath <- file.path(tempdir(), "testout.xlsx")
dfs2xlsx(withNames("sheet1", df1, "sheet2", df2), xlsx_fpath)
file.remove(xlsx_fpath)
|
Loading required package: openxlsx
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.