ConditionalFormat class

Office 2013 and later

Defines the ConditionalFormat Class.This class is available in Office2010 or above. When the object is serialized out as xml, its qualified name is x14:conditionalFormat.

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Excel.ConditionalFormat

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

No code example is currently available or this language may not be supported.

2.6.50 CT_ConditionalFormat

Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2009/9/main

Referenced by: CT_ConditionalFormats

This complex type specifies the scope, type, and priority of conditional formatting applied to this PivotTable ([ISO/IEC-29500-1] section 18.10) view.

Child Elements:

pivotAreas: A CT_PivotAreas ([ISO/IEC-29500-4] section A.2) element that specifies a set of PivotTable areas this conditional formatting applies to.

extLst: A CT_ExtensionList ([ISO/IEC-29500-4] section A.2) element that specifies future extensibility for this element.

Attributes:

scope: An ST_Scope ([ISO/IEC-29500-1] section 18.18.67) attribute that specifies the scope of this conditional formatting.

type: An ST_Type ([ISO/IEC-29500-1] section 18.18.84) attribute that MUST NOT be present or MUST be equal to "none".

priority: An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the priority of the PivotTable conditional formatting. This value MUST be greater than or equal to 1. If this attribute is present, there MUST exist a CT_CfRule with a priority attribute equal to the value of this field (1) and it MUST be the same CT_CfRule element that is specified by id. The CT_CfRule specified by this value MUST have an ancestor CT_ConditionalFormatting element with a pivot attribute equal to "true".

id: An ST_Guid ([ISO/IEC-29500-1] section 22.9.2.4) attribute that specifies a particular CT_CfRule. There MUST exist a CT_CfRule with an id attribute equal to this value and it MUST be the same CT_CfRule element that is specified by priority.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_ConditionalFormat">

<xsd:sequence>

<xsd:element name="pivotAreas" type="x:CT_PivotAreas" minOccurs="0" maxOccurs="1"/>

<xsd:element name="extLst" minOccurs="0" maxOccurs="1" type="x:CT_ExtensionList"/>

</xsd:sequence>

<xsd:attribute name="scope" type="x:ST_Scope" default="selection" use="optional"/>

<xsd:attribute name="type" type="x:ST_Type" default="none" use="optional"/>

<xsd:attribute name="priority" use="optional" type="xsd:unsignedInt"/>

<xsd:attribute name="id" type="x:ST_Guid" use="required"/>

</xsd:complexType>

See section 5.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

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