Learn R Programming

openxlsx (version 4.2.6.1)

createWorkbook: Create a new Workbook object

Description

Create a new Workbook object

Usage

createWorkbook(
  creator = ifelse(.Platform$OS.type == "windows", Sys.getenv("USERNAME"),
    Sys.getenv("USER")),
  title = NULL,
  subject = NULL,
  category = NULL
)

Value

Workbook object

Arguments

creator

Creator of the workbook (your name). Defaults to login username

title

Workbook properties title

subject

Workbook properties subject

category

Workbook properties category

Author

Alexander Walker

See Also

loadWorkbook()

saveWorkbook()

Examples

Run this code
## Create a new workbook
wb <- createWorkbook()

## Save workbook to working directory
if (FALSE) {
saveWorkbook(wb, file = "createWorkbookExample.xlsx", overwrite = TRUE)
}

## Set Workbook properties
wb <- createWorkbook(
  creator = "Me",
  title = "title here",
  subject = "this & that",
  category = "something"
)

Run the code above in your browser using DataLab