
Retrieving or creating named cell styles
getOrCreateCellStyle-methods.RdRetrieves or creates cell styles in workbooks.
Details
Retrieves an existing cellstyle if it exists or creates a new one if it
does not exist yet.
Author
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
Examples
if (FALSE) { # \dontrun{
# Load workbook (create if not existing)
wb <- loadWorkbook("getOrCreateCellStyle.xlsx", create = TRUE)
# The first time, the style does not exist yet and gets created
myStyle <- getOrCreateCellStyle(wb, name = "MyStyle")
# The second time, we retrieve the already existing style
myStyle <- getOrCreateCellStyle(wb, name = "MyStyle")
# clean up
file.remove("getOrCreateCellStyle.xlsx")
} # }