Description
A ConditionalFormat object represents a conditional format that Excel will apply to a cell or group of cells if a specified condition is met. Each ConditionalFormat
object contains up to three Condition and a Range object representing the set of cells on which the conditions will be tested.
C#
[DefaultMember( "Item" )] public sealed class ConditionalFormat |
vb.net
<DefaultMember( "Item" )> _ Public NotInheritable Class ConditionalFormat |
Remarks
To create aConditionalFormat
, call the Workbook object's CreateConditionalFormat method.
Examples
C#
ExcelApplication xla = new ExcelApplication(); Workbook wb = xla.Create(); ConditionalFormat cf = wb.CreateConditionalFormat(); |
vb.net
Dim xla As New ExcelApplication() Dim wb As Workbook = xla.Create() Dim cf As ConditionalFormat = wb.CreateConditionalFormat() |
Properties
Name |
Description |
---|---|
Returns the number of Condition objects in the current ConditionalFormat object. | |
Returns the Range of cells that is conditionally formatted by the current ConditionalFormat object. |
Indexers
Name |
Description |
---|---|
Returns the Condition object at the specified 0-based index. |
Methods
Name |
Description |
---|---|
Creates a Condition of the specified ComparisonType. | |
Creates a Condition of the specified ComparisonType. | |
Removes the Condition at the specified index from the conditional format. | |
Removes the specified Condition from the ConditionalFormat object. |