Method new()
Create a new `TableOpenXlsxStyles` object.
Usage
TableOpenXlsxStyles$new(parentTable)
Arguments
parentTable
Owning table.
Method clearStyles()
Clear the collection removing all styles.
Usage
TableOpenXlsxStyles$clearStyles()
Method findNamedStyle()
Find a style in the collection matching the specified base style name.
Usage
TableOpenXlsxStyles$findNamedStyle(baseStyleName)
Arguments
baseStyleName
The style name to find.
Returns
A `TableTableOpenXlsx` object that is the style matching the
specified base style name or `NULL` otherwise.
Method findOrAddStyle()
Find a style in the collection matching the specified base style name and
style properties. If there is no matching style, then optionally add a
new style.
Usage
TableOpenXlsxStyles$findOrAddStyle(
action = "findOrAdd",
baseStyleName = NULL,
isBaseStyle = NULL,
style = NULL,
mapFromCss = TRUE
)
Arguments
action
The action to carry out. Must be one of "find", "add" or
"findOrAdd" (default).
baseStyleName
The style name to find/add.
isBaseStyle
Is the style to be found/added a base style?
style
A `TableStyle` object specifying style properties to be found/added.
mapFromCss
`TRUE` (default) to map the basictabler CSS styles to
corresponding Excel styles, `FALSE` to apply only the specified xl
styles.
Returns
A `TableTableOpenXlsx` object that is the style matching the
specified base style name or `NULL` otherwise.
Method addNamedStyles()
Populate the OpenXlsx styles
based on the styles defined in the table.
Usage
TableOpenXlsxStyles$addNamedStyles(mapFromCss = TRUE)
Arguments
mapFromCss
`TRUE` (default) to map the basictabler CSS styles to
corresponding Excel styles, `FALSE` to apply only the specified xl
styles.
Method asList()
Return the contents of this object as a list for debugging.
Usage
TableOpenXlsxStyles$asList()
Returns
A list of various object properties.
Method asJSON()
Return the contents of this object as JSON for debugging.
Usage
TableOpenXlsxStyles$asJSON()
Returns
A JSON representation of various object properties.
Method asString()
Return the contents of this object as a string for debugging.
Usage
TableOpenXlsxStyles$asString(seperator = ", ")
Arguments
seperator
Delimiter used to combine multiple values into a string.
Returns
A character representation of various object properties.
Method clone()
The objects of this class are cloneable with this method.
Usage
TableOpenXlsxStyles$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.