saveXLworkbook: Save 'Excel' Workbook to disk

Description Usage Arguments Value Examples

View source: R/saveXLworkbook.R

Description

Save 'Excel' Workbook to disk

Usage

1
saveXLworkbook(wbList, fname = "xl.Out.xlsx", timeStamp = FALSE, clean = TRUE)

Arguments

wbList

list with workbook and default cell styles (i.e., output from getXLsettings)

fname

'Excel' file name

timeStamp

Logical field to include date/time stamp in file name (TRUE [default]).

clean

Logical field indicating whether to remove original sheets in workbook

Value

n/a

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.