ConditionalFormatting Class

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

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.ConditionalFormatting

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

[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(ConditionalFormattingRule))]
public class ConditionalFormatting : OpenXmlCompositeElement

The following table lists the possible child types:

  • ConditionalFormattingRule <x:cfRule>

  • ExtensionList <x:extLst>


[ISO/IEC 29500-1 1st Edition]

18.3.1.18 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"/>
</conditionalFormatting>


end example]

Parent Elements

worksheet (§18.3.1.99)

Child Elements

Subclause

cfRule (Conditional Formatting Rule)

§18.3.1.10

extLst (Future Feature Data Storage Area)

§18.2.10

Attributes

Description

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.

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

Community Additions

ADD
Show:
© 2014 Microsoft