setFillPattern-methods

0th

Percentile

Specifying the fill pattern for cell styles

Specifies the fill pattern for a '>cellstyle.

Keywords
methods, utilities
Usage
# S4 method for cellstyle
setFillPattern(object,fill)
Arguments
object

The '>cellstyle to manipulate

fill

The fill pattern to use for the '>cellstyle. fill is normally specified via a corresponding fill constant from the XLC object.

See Also

'>workbook, '>cellstyle, setCellStyle, setStyleAction, XLC

Aliases
  • setFillPattern
  • setFillPattern-methods
  • setFillPattern,cellstyle-method
Examples
# NOT RUN {
# Load workbook (create if not existing)
wb <- loadWorkbook("setFillPattern.xlsx", create = TRUE)

# Create a worksheet
createSheet(wb, name = "cellstyles")

# Create a custom anonymous cell style
cs <- createCellStyle(wb)

# Specify the fill background color for the cell style created above
setFillBackgroundColor(cs, color = XLC$"COLOR.CORNFLOWER_BLUE")

# Specify the fill foreground color
setFillForegroundColor(cs, color = XLC$"COLOR.YELLOW")

# Specify the fill pattern
setFillPattern(cs, fill = XLC$"FILL.BIG_SPOTS")

# Set the cell style created above for the top left cell (A1) in the
# 'cellstyles' worksheet
setCellStyle(wb, sheet = "cellstyles", row = 1, col = 1, cellstyle = cs)

# Save the workbook
saveWorkbook(wb)
# }
Documentation reproduced from package XLConnect, version 0.2-15, License: GPL-3

Community examples

Looks like there are no examples yet.