Clears all styling properties, resetting to default.
a reference to a normal style.
Allows for a non managed style. Useful for tooltips or other transient styles.
Adjustments to the style.
Creates a simple text frame that can be used for rendering and/or measuring.
OptionalallowWrap: boolean
If true then will try to wrap on natural breaks.
Returns the alignment for the style.
Returns the best fit size assuming no content.
Returns the borders.
Returns the font for the style.
Returns the insets content is laid out inside: Excel's, a quarter of the font's widest digit a side (2 px at Calibri 11) and 1 px above and below. Indent is not included because it depends on the alignment and the value's type.
Returns an instance of the named style that this is derived from.
Format used for Number formatting:
Returns the protection format: whether the cell stays editable, and whether it shows its formula, while its sheet is protected.
A boolean value indicating whether the text string in a cell should be prefixed by a single quote mark (e.g., 'text). In these cases, the quote is not stored in the Shared Strings Part.
This is used to determine if the style has rendering artifacts even if there is no content. (For example borders or background)
Returns true if the CellStyle is the normal style
Measure the text using the styling properties
The text to measure.
Optionalsize: number
Size
Optionalfamily: string
Family
Optionaloptions: MetricOptions
Options for the measurement.
Sets the alignment style.
This method allows updating alignments using an ITextFrame.IAlignment.Update or a shorthand property object.
The alignment object or a shorthand property object to apply. Pass null to clear.
Optionaloptions: UpdateOptions
Optional configuration for the update.
The ITextFrame.IAlignment object for further modifications.
Sets the borders.
This method allows updating borders using an IBorders or a shorthand property object.
The borders object or a shorthand property object to apply. Pass null to clear.
Optionaloptions: UpdateOptions
Optional configuration for the update.
The IBorders object for further modifications.
Sets the fill: a color, a fill, or fill properties; null clears it.
Optionaloptions: UpdateOptionsMakes the fill a gradient and returns it.
Optionaloptions: UpdateOptionsSets the font.
Another text style, its properties, or a CSS font shorthand ('bold 12pt Arial').
Pass null to clear.
Optionaloptions: UpdateOptions
Optional configuration for the update.
The updated style.
Sets the named style that this is derived from.
The named style to set.
Optionaloptions: UpdateOptionsOptionaloptions: UpdateOptionsSets the protection format.
The protection or a partial property object to apply. Pass null to clear.
Optionaloptions: UpdateOptions
Optional configuration for the update.
Optionaloptions: UpdateOptionsReturns a JSON representation of the style.
Update many style properties at once.
The style updates.
Optionaloptions: UpdateOptions
Additional options for the update.
The ICellStyle for further modifications.
The
ICellStyleinterface combines user-applied styles with dynamic styles, such as those from tables or conditional formatting, to deliver the current appearance.