Description Usage Arguments Value Examples
Read-in Excel file (workbook) as a list of data frames.
1 |
xlsxPath |
A path to the Excel file, a character. |
rowNames |
Whether to read-in row names, a boolean. |
colNames |
Whether to read-in column names, a boolean. |
... |
... passed to read.xlsx function in the openxlsx package. |
A list of data frames, each representing a sheet in the Excel file (sheet names are list element names).
1 2 3 4 5 6 7 8 | # create example file
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)
# read created file
dfs <- xlsx2dfs(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.