Compartir a través de


ConditionalFormattingValueObject Class

Defines the ConditionalFormattingValueObject Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x14:cfvo.

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Formula))> _
<ChildElementInfoAttribute(GetType(ExtensionList), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class ConditionalFormattingValueObject _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As ConditionalFormattingValueObject
[ChildElementInfoAttribute(typeof(Formula))]
[ChildElementInfoAttribute(typeof(ExtensionList), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class ConditionalFormattingValueObject : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • DocumentFormat.OpenXml.Office.Excel.Formula <xne:f>

  • ExtensionList <x14:extLst>

2.6.26 CT_Cfvo

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: CT_ColorScale, CT_DataBar, CT_IconSet

This complex type specifies a Conditional Formatting Value Object (CFVO) that specifies how to calculate a value from the range of cells to which a conditional formatting rule applies.

Child Elements:

xm:f : An f element that specifies the formula that is evaluated and compared to the cell value by the comparison method specified by gte. The formula MUST adhere to the grammar provided in Formulas, with the following restrictions:

MUST NOT use the ref-infix-operator, book-prefix, local-cell-reference, bang-reference, bang-name, array-constant, sheet-range-reference or structure-reference production rules. <25>

MUST NOT use the A1-relative-column production rule except from the A1-absolute-column production rule, and it MUST NOT use the A1-relative-row production rule except from the A1-absolute-row production rule.

The formula MUST NOT match the single-sheet-area production rule.

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

Attributes:

type : An ST_CfvoType attribute that specifies how the CFVO value is determined.

If this CT_Cfvo element is a child of a CT_ColorScale and specifies the beginning of the color scale, then this attribute MUST NOT be max.

If this CT_Cfvo element is a child of a CT_ColorScale and specifies the end of the color scale, then this attribute MUST NOT be min.

If this CT_Cfvo element is a child of a CT_ColorScale and specifies the midpoint of the color scale, then this attribute MUST NOT be max and MUST NOT be min.

If this CT_Cfvo element is a child of a CT_DataBar and specifies the cell value for the min length of the data bar, then this attribute MUST NOT be max or autoMax.

If this CT_Cfvo element is a child of a CT_DataBar and specifies the cell value for the max length of the data bar, then this attribute MUST NOT be min or autoMin.

If this CT_Cfvo element is not a child of a CT_DataBar, then this attribute MUST NOT be autoMin and MUST NOT be autoMax.

If this CT_Cfvo element is a child of a CT_IconSet record, then this value MUST NOT be max or min.

If the value is max, min, autoMax or autoMin, then f MUST NOT be present.

gte : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the CT_Cfvo will use greater-than or greater-than-or-equal-to when applying conditional formatting rules. If this CT_Cfvo element is a child of something other than a CT_IconSet element, then this attribute MUST not be present. The value of this attribute is interpreted as follows:

Value

Meaning

false

Greater-than is used when applying conditional formatting rules.

true

Greater-than-or-equal-to is used when applying conditional formatting rules.

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

<xsd:complexType name="CT_Cfvo">

<xsd:sequence>

<xsd:element ref="xm:f" minOccurs="0" maxOccurs="1"/>

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

</xsd:sequence>

<xsd:attribute name="type" type="ST_CfvoType" use="required"/>

<xsd:attribute name="gte" type="xsd:boolean" use="optional" default="true"/>

</xsd:complexType>

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

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

Reference

ConditionalFormattingValueObject Members

DocumentFormat.OpenXml.Office2010.Excel Namespace