Description Usage Arguments Details Value Examples
View source: R/addXLSheetStd.R
Add a sheet to the 'Excel' workbook
1 | addXLsheetStd(wbList = XL.wb, df = NA, sheetName = NA, descrip = NA)
|
wbList |
list with workbook and default cell styles (i.e., output from getXLsettings) |
df |
data frame to output to sheet |
sheetName |
sheet name |
descrip |
description of sheet |
The sheetName
is the name that will be used for the sheet. When
sheetName
is not specified, the name of the df
will be used. The
descrip
is a character string that will be placed into cell A1 of the sheet
and is best used to provide a brief description of the sheet; and the dataframe
will begin at cell A3. If descrip
is not specified, then the dataframe will
begin at cell A1. The outputted table will have filters turned on and table headers
and first column frozen.
list with workbook and default cell styles
1 2 3 4 5 6 7 8 9 10 | XL.wb <- getXLsettings()
XL.wb <- addXLsheetStd(XL.wb, mtcars)
XL.wb <- addXLsheetStd(XL.wb, mtcars, "mtcars1")
XL.wb <- addXLsheetStd(XL.wb, mtcars, "mtcars2", "Standard mtcars data frame")
XL.wb$pName <- "ProjName" # optional, blank if not included
XL.wb$pDesc <- "ProjDesc" # optional, blank if not included
saveXLworkbook(XL.wb, file.path(tempdir(), 'myXLfile.xlsx'), timeStamp=FALSE, clean=FALSE)
saveXLworkbook(XL.wb, file.path(tempdir(), 'myXLfile.xlsx'), timeStamp=TRUE, clean=FALSE)
saveXLworkbook(XL.wb, file.path(tempdir(), 'myXLfile.xlsx'), timeStamp=TRUE, clean=TRUE)
saveXLworkbook(XL.wb, file.path(tempdir(), 'myXLfile.xlsx'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.