Description Usage Arguments Value See Also Examples
Create a sheet from an appropriate data input.
1 | createSheet(dat, sheetname)
|
dat |
appropriate data input (see examples and vignette) |
sheetname |
name of the sheet |
A named list containing one element: the list of cells.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Create a sheet from a dataframe
sheet <- createSheet(mtcars[1:2, 1:2], "Sheet1")
# write to xlsx.xlsx:
hwriteXLSX(file="xlsx.xlsx", worksheet=sheet)
# Create a sheet from a list of lists
dat <-
list(
A = list(1, 2, 3),
B = list(NULL, "a", 1000),
C = list(NA, "b")
)
attr(dat$B[[2]], "color") <- "red"
attr(dat$B[[2]], "comment") <- "this cell is red"
attr(dat$C[[1]], "comment") <- "this cell is empty"
sheet <- createSheet(dat, "Sheet1")
hwriteXLSX("xlsx.xlsx", sheet)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.