getOrCreateCellStyle-methods | R Documentation |
Retrieves or creates cell styles in workbook
s.
## S4 method for signature 'workbook,character' getOrCreateCellStyle(object,name)
object |
The |
name |
The name of the |
Retrieves an existing cellstyle
if it exists or creates a new one if it
does not exist yet.
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
, cellstyle
, setCellStyle
,
createCellStyle
, existsCellStyle
## Not run: # 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") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.