ConditionalFormatting Class

Conditional Formatting.When the object is serialized out as xml, its qualified name is x:conditionalFormatting.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(ConditionalFormattingRule))> _
Public Class ConditionalFormatting _
    Inherits OpenXmlCompositeElement
Dim instance As ConditionalFormatting
public class ConditionalFormatting : OpenXmlCompositeElement


The following table lists the possible child types:

  • ConditionalFormattingRule <x:cfRule>

  • ExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition] conditionalFormatting (Conditional Formatting)

A Conditional Format is a format, such as cell shading or font color, that a spreadsheet application can automatically apply to cells if a specified condition is true. This collection expresses conditional formatting rules applied to a particular cell or range.

[Example:This example applies a 'top10' rule to the cells C3:C8. The *@dxfId* references the formatting (defined in the styles part) to be applied to cells that match the criteria.

<conditionalFormatting sqref="C3:C8">
<cfRule type="top10" dxfId="1" priority="3" rank="2"/>

end example]

Parent Elements

worksheet (§

Child Elements


cfRule (Conditional Formatting Rule)


extLst (Future Feature Data Storage Area)




pivot (PivotTable Conditional Formatting)

Flag indicating if this is conditional formatting associated with a PivotTable.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

sqref (Sequence of Refernces)

Range over which these conditional formatting rules apply.

The possible values for this attribute are defined by the ST_Sqref simple type (§18.18.76).

[Note: The W3C XML Schema definition of this element’s content model (CT_ConditionalFormatting) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


ConditionalFormatting Members

DocumentFormat.OpenXml.Spreadsheet Namespace