properties-wb | R Documentation |
This function is useful for workbooks that are loaded. It can be used to set the
workbook title
, subject
and category
field. Use wb_workbook()
to easily set these properties with a new workbook.
wb_get_properties(wb)
wb_set_properties(
wb,
creator = NULL,
title = NULL,
subject = NULL,
category = NULL,
datetime_created = NULL,
datetime_modified = NULL,
modifier = NULL,
keywords = NULL,
comments = NULL,
manager = NULL,
company = NULL,
custom = NULL
)
wb |
A Workbook object |
creator |
Creator of the workbook (your name). Defaults to login username or |
title , subject , category , keywords , comments , manager , company |
Workbook property, a string. |
datetime_created |
The time of the workbook is created |
datetime_modified |
The time of the workbook was last modified |
modifier |
A character string indicating who was the last person to modify the workbook |
custom |
A named vector of custom properties added to the workbook |
To set properties, the following XML core properties are used.
title = dc:title
subject = dc:subject
creator = dc:creator
keywords = cp:keywords
comments = dc:description
modifier = cp:lastModifiedBy
datetime_created = dcterms:created
datetime_modified = dcterms:modified
category = cp:category
In addition, manager and company are used.
A wbWorkbook object, invisibly.
wb_workbook()
file <- system.file("extdata", "openxlsx2_example.xlsx", package = "openxlsx2")
wb <- wb_load(file)
wb$get_properties()
# Add a title to properties
wb$set_properties(title = "my title")
wb$get_properties()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.