getOrCreateCellStyle-methods

0th

Percentile

Retrieving or creating named cell styles

Retrieves or creates cell styles in '>workbooks.

Keywords
methods, utilities
Usage
# S4 method for workbook,character
getOrCreateCellStyle(object,name)
Arguments
object

The '>workbook to use

name

The name of the '>cellstyle to retrieve or to create

Details

Retrieves an existing '>cellstyle if it exists or creates a new one if it does not exist yet.

See Also

'>workbook, '>cellstyle, setCellStyle, createCellStyle, existsCellStyle

Aliases
  • getOrCreateCellStyle
  • getOrCreateCellStyle-methods
  • getOrCreateCellStyle,workbook,character-method
Examples
# 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")
# }
Documentation reproduced from package XLConnect, version 0.2-14, License: GPL-3

Community examples

Looks like there are no examples yet.