[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
This element defines a gradient-style cell fill. Gradient cell fills can use one or two colors as the end points of color interpolation.
[Example:
This example shows a gradient cell fill, with color green at the top transitioning into blue at the bottom.
This is the XML:
<fill>
<gradientFill degree="90">
<stop position="0">
<color rgb="FF92D050"/>
</stop>
<stop position="1">
<color rgb="FF0070C0"/>
</stop>
</gradientFill>
</fill>
This example shows a gradient cell fill, from the center. Note the left, right, top, and bottom values (and see explanation in the attribute section):
<fill>
<gradientFill type="path" left="0.2" right="0.8" top="0.2" bottom="0.8">
<stop position="0">
<color theme="0"/>
</stop>
<stop position="1">
<color theme="4"/>
</stop>
</gradientFill>
</fill>
end example]
Parent Elements |
fill (§3.8.19) |
Child Elements |
Subclause |
stop (Gradient Stop) |
§3.8.38 |
Attributes |
Description |
bottom (Bottom Convergence) |
Valid values are 0 to 1. Specifies in percentage format (from the top to the bottom) the position of the bottom edge of the inner rectangle (color 1). For bottom, 0 means the bottom edge of the inner rectangle is on the top edge of the cell, and 1 means it is on the bottom edge of the cell.
The possible values for this attribute are defined by the XML Schema double datatype. |
degree (Linear Gradient Degree) |
Angle of the linear gradient - vertical, horizontal, diagonal.
[Example: Note: in these examples, color 1 is white and color 2 is blue.
90 = Horizontal & color 1 to color 2
270 = Horizontal & color 1 to color 2
0 = Vertical & color 1 to color 2
180 = Vertical & color 1 to color 2
45 = Diagonal Up & top to bottom (color 1 to color 2)
225 = Diagonal Up & bottom to top (color 1 to color 2) 135 = Diagonal Down & top to bottom (color 1 to color 2) 315 = Diagonal Down & bottom to top (color 1 to color 2)
end example]
The possible values for this attribute are defined by the XML Schema double datatype. |
left (Left Convergence) |
Valid values are 0 to 1. Specifies in percentage format (from the left to the right) the position of the left edge of the inner rectangle (color 1). For left, 0 means the left edge of the inner rectangle is on the left edge of the cell, and 1 means it is on the right edge of the cell. (applies to From Corner and From Center gradients).
The possible values for this attribute are defined by the XML Schema double datatype. |
right (Right Convergence) |
Valid values are 0 to 1. Specifies in percentage format (from the left to the right) the position of the right edge of the inner rectangle (color 1). For right, 0 means the right edge of the inner rectangle is on the left edge of the cell, and 1 means it is on the right edge of the cell. (applies to From Corner and From Center gradients).
The possible values for this attribute are defined by the XML Schema double datatype. |
top (Top Gradient Convergence) |
Valid values are 0 to 1. Specifies in percentage format (from the top to the bottom) the position of the top edge of the inner rectangle (color 1). For top, 0 means the top edge of the inner rectangle is on the top edge of the cell, and 1 means it is on the bottom edge of the cell. (applies to From Corner and From Center gradients).
The possible values for this attribute are defined by the XML Schema double datatype. |
type (Gradient Fill Type) |
Type of this gradient fill.
The possible values for this attribute are defined by the ST_GradientType simple type (§3.18.38). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_GradientFill">
<sequence>
<element name="stop" type="CT_GradientStop" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="type" type="ST_GradientType" use="optional" default="linear"/>
<attribute name="degree" type="xsd:double" use="optional" default="0"/>
<attribute name="left" type="xsd:double" use="optional" default="0"/>
<attribute name="right" type="xsd:double" use="optional" default="0"/>
<attribute name="top" type="xsd:double" use="optional" default="0"/>
<attribute name="bottom" type="xsd:double" use="optional" default="0"/>
</complexType>