saveWorkbook: Save Work Book

Description Usage Arguments Value Note Examples

Description

saveWorkbook saves an Excel workbook on the file system, setting the metadata. Optionally, the file is opened in Excel.

Usage

1
2
3
saveWorkbook(workbook = getWorkbook(), filePath = thisFile(),
  title = NA, subject = NA, creator = Sys.getenv("USERNAME"),
  start = FALSE)

Arguments

workbook

An optional xlsxSimple workbook.

filePath

An optional character scalar, the path and filename for the file.

title

An optional character scalar, the title of the workbook.

subject

An optional character scalar, the subject of the workbook.

creator

An optional character scalar, the creator of the workbook. Defaults to the logged-on user name.

start

An optional logical scalar, should the workbook be started in Excel.

Value

A character scalar, the path of the file, invisibly.

Note

If the filePath does not end with “.xlsx” then the fiile extension will be set to “.xlsx”. If file,path is omitted then the script file path will be used, but that extension substiuted. But an error it thrown if filePath is omitted in interactive mode.

Examples

1
2
book <- createWorkbook()
saveWorkbook(book, "foo.xlsx", "Foo", "Examples", start=TRUE)

But-I-Digress/xlsxSimple documentation built on Jan. 26, 2020, 9:53 a.m.