ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
Add Listeners.
Optionaloptions: IListener.OptionsApplies the condition.
OptionalcloneCreates a new instance of the range with specified updates applied.
The updates to apply to the range's properties.
A new ICellRanged instance with the applied updates.
Similar to delete but cleans resources and can't be undone.
Deletes the anchored item.
OptionalgetReturn the condition, or null if none is set.
Returns what this rule draws in a cell, or null if it draws nothing there.
The cell's row.
The cell's column.
The cell's value.
The render-side companion to IProperties.ICellRanged.getPropertiesAt: a rule that restyles a cell answers through that, a rule that draws in it answers through this. Only a data bar or an icon set ever returns a decoration — a color scale resolves to a fill and so travels the style path.
Like getPropertiesAt this is a synchronous read off a prepared cache, never an evaluation:
the range-wide domain (min / max / percentile) is resolved asynchronously when values change.
A rule whose domain has not resolved yet returns null.
OptionalgetThe name of the anchor or null if it has none.
Retrieves the properties associated with a specified cell within the range.
The row index within the range.
The column index within the range.
The value at the coordinates.
The properties associated with the specified cell as a read-only object.
Returns the ranges this object is anchored to, in authored order.
Optionaloptions: ICellRange.GetRangeOptionsnull. An item whose last range was removed by a row/column delete returns an
invalid ranges — ask ICellRanges.isInvalid, the same contract as
ITable.getDataRange.getRange() for it, but data validations, conditional formats and protected ranges are
authored as several, and any single range can become several when a delete splits it.Returns the value→visual mapping for this rule, or null if the rule is a predicate.
Color scales, data bars and icon sets are not predicates: they map the whole range's spread of values onto a rendering rather than testing each cell. A rule carries either a IConditionalFormat.getCondition or a scale, never both.
Returns a snapshot of the conditional that can be used for copying and archiving.
Optionaloptions: CopyOptionsReturns the style applied when the condition is met, or null if the rule renders itself
(see IConditionalFormat.getScale).
Returns if the model has been closed
Returns if the model has been deleted
If the anchor is unable to be modified.
The flag as authored, which is what round-trips — not whether it takes effect. It is a
predicate-rule concept: a color scale, data bar or icon set always applies, so it ends
nothing, and Excel greys the checkbox out for all three. The attribute is still schema-legal
on any cfRule, so a rule can arrive from a file carrying it on a data bar; Excel ignores it
there and so does evaluation here. The authored value is kept verbatim rather than rewritten
on load, so such a rule round-trips unchanged.
Set the condition.
Optionaloptions: ITransaction.OperationOptionsThe condition is the rule's predicate — there is no second, OOXML-shaped representation of it. A rule that maps a range of values onto a visual instead of testing each cell carries a IConditionalFormat.getScale rather than a condition.
Sets the index of this conditional format within its container.
The new index to set.
Re-anchors this rule to address, REPLACING every range it currently covers.
The range or ranges to cover — anything ISheet.getRanges accepts
('A1:C20', 'A1:A5, C1:C5', coords). Resolved against this rule's own sheet.
Optionaloptions: ITransaction.OperationOptions
Transaction options; description names the entry in undo history.
A REPLACE, not an add: the ranges named become the whole anchor. An address that names nothing throws rather than leaving the rule unanchored — clearing is IAnchored.delete.
Undoable, and refused on a protected sheet. A rule spans several ranges as readily as
one; Excel writes them as one sqref, and so do we.
Sets whether to stop evaluating additional conditional formatting rules if this rule is true.
A boolean to indicate if this is a stop.
Optionaloptions: ITransaction.OperationOptionsThe current state as a JSON object, or null if there is no state.
Set multiple properties at the same time.
Optionaloptions: ITransaction.OperationOptionsOnly the keys named are touched. An explicit null clears a key — required when switching
a rule between its two shapes, since condition+style and scale are mutually exclusive
(setting one side also clears the other unless the caller named both).
Passing another rule takes its whole definition — every key, cleared where the other rule has none — so the shape switches with it. The anchor is not part of it.
Represents a conditional formatting rule for a range.
Remarks
Used for modifying the type and rules of a conditional formatting entry.
Conditional formatting rules can be used to highlight, format, or modify cell appearance based on data conditions or criteria.
Conditional formatting help users identify patterns, trends, and exceptions in data by applying visual styles dynamically.