getCellStyle-methods | R Documentation |
Retrieves a named cell style from a workbook
.
## S4 method for signature 'workbook'
getCellStyle(object,name)
object |
The |
name |
The name of the |
Retrieves the cellstyle
with the specified name
.
Thomas Themel
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
, cellstyle
, setStyleAction
,
createCellStyle
, getOrCreateCellStyle
,
existsCellStyle
,
setStyleNamePrefix
, setCellStyle
,
setDataFormat
, setBorder
,
setFillBackgroundColor
, setFillForegroundColor
,
setFillPattern
, setWrapText
## Not run:
# Load workbook (create if not existing)
wb <- loadWorkbook("getCellstyles.xlsx", create = TRUE)
# You wouldn't usually ignore the return value here...
createCellStyle(wb, 'Header')
# ... but if you did it doesn't hurt.
cs <- getCellStyle(wb, 'Header')
# Specify the cell style to use a solid foreground color
setFillPattern(cs, fill = XLC$"FILL.SOLID_FOREGROUND")
# Specify the foreground color to be used
setFillForegroundColor(cs, color = XLC$"COLOR.RED")
# clean up
file.remove("getCellstyles.xlsx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.