ColorScale class

Office 2013 and later

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

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.29 CT_ColorScale

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

Referenced by: CT_CfRule

A complex type that specifies a color scale used in conditional formatting.

Child Elements:

cfvo: A CT_Cfvo element that specifies the cell values corresponding to the interpolation colors of the color scale. The CT_ColorScale MUST have either two or three child CT_Cfvo elements.

If there are two child CT_Cfvo elements present, the first child CT_Cfvo element specifies the cell value corresponding to the beginning color of the color scale. The second child CT_Cfvo element specifies the cell value corresponding to the end color of the color scale.

If there are three child CT_Cfvo elements present, the first child CT_Cfvo element specifies the cell value corresponding to the beginning color of the color scale. The second child CT_Cfvo element specifies the cell value corresponding to the midpoint color of the color scale. The third child CT_Cfvo element specifies the cell value corresponding to the end color of the color scale.

color: A CT_Color ([ISO/IEC-29500-4] section A.2) element that specifies the interpolation colors of the color scale for the cfvo element at the same corresponding position. The CT_ColorScale MUST have either two or three child CT_Color ([ISO/IEC-29500-4] section A.2) elements, and the number of child elements MUST equal the number of CT_Cfvo child elements.

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

<xsd:complexType name="CT_ColorScale">

<xsd:sequence>

<xsd:element name="cfvo" type="CT_Cfvo" minOccurs="2" maxOccurs="unbounded"/>

<xsd:element name="color" type="x:CT_Color" minOccurs="2" maxOccurs="unbounded"/>

</xsd:sequence>

</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: