getXLsettings: Get Default 'Excel' cell styles

Description Usage Arguments Details Value Examples

View source: R/getXLsettings.R

Description

Get Default 'Excel' cell styles

Usage

1
getXLsettings(fname = NA)

Arguments

fname

'Excel' file name

Details

If no 'Excel' file is specified then the built in cell styles are used. User-supplied 'Excel' file would need to have the following cell styles specified: xl.descrip, xl.normal, xl.header, xl.header.wrap, xl.hyperlink.

Value

list with workbook and default cell styles

Examples

 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'))

xlsimple documentation built on Aug. 1, 2020, 1:07 a.m.