Page tree
    Created with Raphaël 2.1.0
    Loading...
Skip to end of metadata
Go to start of metadata

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 a ConditionalFormat, 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

Count

Returns the number of Condition objects in the current ConditionalFormat object.

Range

Returns the Range of cells that is conditionally formatted by the current ConditionalFormat object.

Indexers

Name

Description

Item(Int32)

Returns the Condition object at the specified 0-based index.

Methods

Name

Description

CreateCondition(Comparison, String)

Creates a Condition of the specified ComparisonType.

CreateCondition(Comparison, String, String)

Creates a Condition of the specified ComparisonType.

RemoveCondition(Int32)

Removes the Condition at the specified index from the conditional format.

RemoveCondition(Condition)

Removes the specified Condition from the ConditionalFormat object.
  • No labels