2.2.41 CT_Cell

Referenced by: CT_RowAxisItem

A worksheet cell that is not empty or that has a border style or cell style other than the default.

Child Elements:

Data: Information pertaining to the worksheet cell value. This element MUST be present if the worksheet cell is not empty.

Attributes:

BorderID: The border style associated with the worksheet cell.

Index: The index of the column associated with the worksheet cell. This attribute (2) MUST NOT be present for the first CT_Cell in the CT_RowAxisItem element, otherwise this attribute (2) MUST be present when one or more preceding adjacent cell CT_Cell elements are omitted. CT_Cell elements are omitted in the following situations:

StyleID: The formatting style associated with the worksheet cell.

SpanType:  Specifies the reason why the worksheet cell occupies more than one row or column. This attribute (2) MUST NOT be present if the cell does not occupy more than one row or column.

SpillOrigin: The index of the column associated with the first worksheet cell in a merged range. This attribute (2) MUST be present when SpanType is "Spill" and MUST NOT be present otherwise.

DatabarLength: The percentage of the worksheet cell width that contains the data bar. This attribute (2) MUST be present when the worksheet cell contains a data bar and MUST NOT be present otherwise. If present, the value of this attribute (2) MUST be positive when DatabarAxisPosition is not present.

If present, the value of this attribute (2) MUST be positive when any of the following conditions are met:

  • DatabarDirection is "LeftToRight", and the data bar is to the right of the data bar axis.

  • DatabarDirection is "Context", and the CT_WorksheetOptions DisplayRightToLeft attribute (2) is false and the data bar is to the right of the data bar axis.

  • DatabarDirection is "RightToLeft", and the data bar is to the left of the data bar axis.

  • DatabarDirection is "Context", and the CT_WorksheetOptions DisplayRightToLeft attribute (2) is true and the data bar is to the left of the data bar axis.

If DatabarLength is present and the aforementioned conditions are not met, the value of this attribute (2) MUST be negative.

DatabarColor: The color of the data bar in the worksheet cell. This attribute (2) MUST be present when DatabarLength is present and MUST NOT be present otherwise.

DatabarStyle:  The type of fill color effect for the data bar in the worksheet cell. This attribute (2) MUST be present when DatabarLength is present and MUST NOT be present otherwise.

DatabarBorderColor: The color of the data bar border. This attribute (2) MUST be present when DatabarLength is present and there is a border on the data bar and MUST NOT be present otherwise.

DatabarDirection: The direction of the data bar in the worksheet cell. This attribute (2) MUST be present when DatabarLength is present and MUST NOT be present otherwise.

DatabarAxisPosition: The percentage of the worksheet cell width where the data bar axis is located from the left edge of the worksheet cell. This attribute (2) MUST be present when DatabarLength is present and there is a data bar axis and MUST NOT be present otherwise.

If DatabarAxisPosition is present, the position of the data bar within the worksheet cell MUST be to the right of the data bar axis when any of the following conditions are met:

  • DatabarDirection is "LeftToRight", and the value of DatabarLength is positive.

  • DatabarDirection is "RightToLeft", and the value of DatabarLength is negative.

  • DatabarDirection is "Context", the CT_WorksheetOptions DisplayRightToLeft attribute (2) is false, and the value of DatabarLength is positive.

  • DatabarDirection is "Context", the CT_WorksheetOptions DisplayRightToLeft attribute (2) is true, and the value of DatabarLength is negative.

If DatabarAxisPosition is present and the aforementioned conditions are not met, the position of the data bar within the worksheet cell MUST be to the left of the data bar axis.

DatabarAxisColor: The color of the data bar axis line. This attribute (2) MUST be present when DatabarLength is present and there is a data bar axis and MUST NOT be present otherwise.

HasDropDown: Specifies whether a PivotTable filtering control is associated with the worksheet cell.

KpiSet: Mapping to a particular set of  key performance indicator (KPI) to use for conditional formatting in the worksheet cell. If this attribute (2) is present, it MUST have one of the values described in the following table.

Value

Meaning

KpiIcon range

-1

No key performance indicators.

N/A

0

Equivalent to the [MS-XLSX] ST_IconSetType 3Arrows enumeration value.

0 to 2

1

Equivalent to the [MS-XLSX] ST_IconSetType 3ArrowsGray enumeration value.

0 to 2

2

Equivalent to the [MS-XLSX] ST_IconSetType 3Flags enumeration value.

0 to 2

3

Equivalent to the [MS-XLSX] ST_IconSetType 3TrafficLights1 enumeration value.

0 to 2

4

Equivalent to the [MS-XLSX] ST_IconSetType 3TrafficLights2 enumeration value.

0 to 2

5

Equivalent to the [MS-XLSX] ST_IconSetType 3Signs enumeration value.

0 to 2

6

Equivalent to the [MS-XLSX] ST_IconSetType 3Symbols enumeration value.

0 to 2

7

Equivalent to the [MS-XLSX] ST_IconSetType 3Symbols2 enumeration value.

0 to 2

8

Equivalent to the [MS-XLSX] ST_IconSetType 4Arrows enumeration value.

0 to 3

9

Equivalent to the [MS-XLSX] ST_IconSetType 4ArrowsGray enumeration value.

0 to 3

10

Equivalent to the [MS-XLSX] ST_IconSetType 4RedToBlack enumeration value.

0 to 3

11

Equivalent to the [MS-XLSX] ST_IconSetType 4Rating enumeration value.

0 to 3

12

Equivalent to the [MS-XLSX] ST_IconSetType 4TrafficLights enumeration value.

0 to 3

13

Equivalent to the [MS-XLSX] ST_IconSetType 5Arrows enumeration value.

0 to 4

14

Equivalent to the [MS-XLSX] ST_IconSetType 5ArrowsGray enumeration value.

0 to 4

15

Equivalent to the [MS-XLSX] ST_IconSetType 5Ratings enumeration value.

0 to 4

16

Equivalent to the [MS-XLSX] ST_IconSetType 5Quarters enumeration value.

0 to 4

17

Equivalent to the [MS-XLSX] ST_IconSetType 3Stars enumeration value.

0 to 2

18

Equivalent to the [MS-XLSX] ST_IconSetType 3Triangles enumeration value.

0 to 2

19

Equivalent to the [MS-XLSX] ST_IconSetType 5Boxes enumeration value.

0 to 4

KpiIcon: Mapping to an icon within the set of key performance indicator (KPI) icons specified by the KpiSet attribute (2). This attribute (2) MUST be present when the KpiSet attribute (2) is present and has a value other than -1 and MUST have a value within the range specified in the "KpiIcon Range" column in the previous table for the row corresponding to the value of KpiSet. It MUST NOT be present otherwise.

KpiSize: The size of the KPI icon to use. This attribute (2) MUST be present when the KpiSet attribute (2) is present and has a value other than -1. It otherwise MUST be omitted.

MergeDown: The number of additional rows in the merged range excluding the current worksheet cell. This attribute (2) MUST be present if any one of the following conditions is true:

  • The CT_WorksheetOptions DisplayRightToLeft attribute (2) is false and the worksheet cell is the upper-left visible worksheet cell in a merged range.

  • The CT_WorksheetOptions DisplayRightToLeft attribute (2) is true and the worksheet cell is the upper-right visible worksheet cell in a merged range.

It MUST NOT be present otherwise.

MergeAcross: The number of additional columns (2) in the merged range excluding the current worksheet cell. This attribute (2) MUST be present if any one of the following conditions is true:

  • The CT_WorksheetOptions DisplayRightToLeft attribute (2) is false and the worksheet cell is the upper-left visible worksheet cell in a merged range.

  • The CT_WorksheetOptions DisplayRightToLeft attribute (2) is true and the worksheet cell is the upper-right visible worksheet cell in a merged range.

It MUST NOT be present otherwise.

FirstRow: The first row (2) of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

FirstColumn: The first column of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

LastRow: The last row (2) of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

LastColumn: The last column of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

XOriginDelta: This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise. If present, the value of this attribute (2) MUST be one of the following:

  • If the CT_WorksheetOptions DisplayRightToLeft attribute (2) is false, the X coordinate in points of the left edge of the first column in the merged range relative to the left edge of the worksheet cell.

  • If the CT_WorksheetOptions DisplayRightToLeft attribute (2) is true, the X coordinate in points of the right edge of the worksheet cell relative to the right edge of the first column in the merged range.

YOriginDelta: The Y coordinate in points of the top edge of the first row (2) in the merged range relative to the top edge of the worksheet cell. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

Width: The total width in points of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

Height: The total height in points of the merged range to which the worksheet cell belongs. This attribute (2) MUST be present if the worksheet cell is part of a merged range and the merged range is not completely contained within the requested range, and MUST NOT be present otherwise.

OriginalText: The contents of a worksheet cell as it is displayed to the user. This attribute (2) MUST be present when the worksheet cell has a tool tip, rich text formatting, or the worksheet cell value is clipped, and MUST NOT be present otherwise.

DropDownType: The filter applied to the filtering control. This attribute (2) MUST NOT be present when the HasDropDown attribute is false or not present.

IsPivotPageField: Specifies whether the worksheet cell is a PivotTable page field. This attribute (2) MUST be omitted if the HasDropDown attribute (2) is false.

PageFieldID: The identifier for the PivotTable page field filter associated with the worksheet cell. This attribute (2) MUST be omitted if the IsPivotPageField attribute (2) is false.

Drillable: Specifies whether the worksheet cell is a row field or a column field in an OLAP PivotTable. This attribute (2) MUST be present and set to true for all worksheet cells that are row (2) fields or column fields in an OLAP PivotTable. It MUST NOT be present otherwise.

HasDrillIndicator: Specifies whether there is a PivotTable drill indicator present in the worksheet cell. This attribute (2) MUST be present and set to true for all worksheet cells that are row (2) fields or column fields in a PivotTable and have a drill indicator. It MUST NOT be present otherwise.

CompactAxis: Specifies whether the row (2) field has a compact axis. This attribute (2) MUST be present and set to true if the HasDrillIndicator attribute (2) is true and the row (2) field represented by the worksheet cell has a compact axis. It MUST NOT be present otherwise.

ExtraIndentSpace: Specifies whether the cell contents require additional indentation. This attribute (2) MUST be present and set to true if any one of the following conditions is true:

  • The HasDrillIndicator attribute (2) is true and the CompactAxis attribute (2) is not true.

  • The worksheet cell represents a row (2) field in a PivotTable and the row (2) field has a compact axis and the row (2) field has child items.

It MUST NOT be present otherwise.

WideIndent: Specifies whether indentation for the cell contents is incremented during rendering. This attribute (2) MUST be present and set to true if the worksheet cell represents a row (2)field in a PivotTable and if the row (2) field has a compact axis and the indentation for row (2) captions is set to 1 character in the worksheet. It MUST NOT be present otherwise.

Expanded: Specifies whether the drill indicator is in an expanded or collapsed state when the worksheet cell has a PivotTable drill indicator. This attribute (2) MUST be present and set to true if the HasDrillIndicator attribute (2) is true and the PivotTable drill indicator in the worksheet cell is in an expanded state. It MUST NOT be present otherwise.

Horizontal: The type of horizontal alignment applied to the key performance indicator (KPI) icon in a worksheet cell with conditional formatting. This attribute (2) MUST NOT be present if the iconOnly attribute (2) is not true. If the iconOnly attribute (2) is true, this attribute (2) MUST be present if horizontal alignment is applied. It MUST NOT be present otherwise.

iconOnly: Specifies whether only the key performance indicator (KPI) icon is shown in the worksheet cell, without the data in the worksheet cell. This attribute (2) MUST be present and set to true if a key performance indicator (KPI) icon is present in the worksheet cell, without the data in the worksheet cell. It MUST NOT be present otherwise.

FormulaError: Specifies whether the worksheet cell contents contains an invalid formula. MUST be present and set to true if the cell contents contains an invalid formula. It MUST NOT be present otherwise.

HasPhonInfo: Specifies whether the worksheet cell contains phonetic information. MUST be present and set to true if the cell contents contains phonetic information. It MUST NOT be present otherwise.

FormulaBarText: The cell contents of a worksheet cell.

HasSparkline: Specifies whether there is a sparkline present in the worksheet cell. This attribute (2) MUST be present and set to true for all worksheet cells that contain sparklines. It MUST NOT be present otherwise.

SparklineClusterOffsetTop: The Y coordinate in pixels of the offset of the origin of the sparkline for the worksheet cell relative to the top edge of the sparkline image. This attribute (2) MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineClusterOffsetLeft:  The X coordinate in pixels of the offset of the origin of the sparkline for the worksheet cell relative to the left edge of the sparkline image. This attribute (2) MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineClusterFirstRow: The first row (2) of the requested range. MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineClusterLastRow:  The last row (2) of the requested range. MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineClusterFirstColumn:  The first column of the requested range. MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineClusterLastColumn:  The last column of the requested range. MUST be present if HasSparkline is present and MUST NOT be present otherwise.

SparklineVersion:  A unique identifier for the state of the sparkline on the protocol server. MUST be present if HasSparkline is present and MUST NOT be present otherwise.

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

 <xs:complexType name="CT_Cell">
   <xs:sequence>
     <xs:element name="Data" minOccurs="0" maxOccurs="1" type="CT_Data"/>
   </xs:sequence>
   <xs:attribute name="BorderID" type="ST_borderStyleID" default="bD" use="optional"/>
   <xs:attribute name="Index" type="ST_excelColNumber1Based" use="optional"/>
   <xs:attribute name="StyleID" type="ST_cellStyleID" default="sD" use="optional"/>
   <xs:attribute name="SpanType" type="ST_enmCellSpanType" use="optional" default="None"/>
   <xs:attribute name="SpillOrigin" type="ST_excelColNumber1Based" use="optional"/>
   <xs:attribute name="DatabarLength" type="ST_databarLengthPercentage" default="0" use="optional"/>
   <xs:attribute name="DatabarColor" type="ST_rgbTuple" use="optional"/>
   <xs:attribute name="DatabarStyle" type="ST_enmDatabarStyle" use="optional" default="Gradient"/>
   <xs:attribute name="DatabarBorderColor" type="ST_rgbTuple" use="optional"/>
   <xs:attribute name="DatabarDirection" type="ST_enmReadOrder" use="optional" default="Context"/>
   <xs:attribute name="DatabarAxisPosition" type="ST_databarLengthPercentage" default="0" use="optional"/>
   <xs:attribute name="DatabarAxisColor" type="ST_rgbTuple" use="optional"/>
   <xs:attribute name="HasDropDown" type="xs:boolean" use="optional"/>
   <xs:attribute name="KpiSet" use="optional" default="-1" type="ST_KpiSet"/>
   <xs:attribute name="KpiIcon" use="optional" type="ST_KpiIcon"/>
   <xs:attribute name="KpiSize" use="optional" type="ST_KpiSize"/>
   <xs:attribute name="MergeDown" use="optional" type="ST_MergeDown"/>
   <xs:attribute name="MergeAcross" use="optional" type="ST_MergeAcross"/>
   <xs:attribute name="FirstRow" type="ST_excelRowNumber" use="optional" default="0"/>
   <xs:attribute name="FirstColumn" type="ST_excelColNumber" use="optional" default="0"/>
   <xs:attribute name="LastRow" type="ST_excelRowNumber" use="optional" default="0"/>
   <xs:attribute name="LastColumn" type="ST_excelColNumber" use="optional" default="0"/>
   <xs:attribute name="XOriginDelta" type="ST_nonPositiveDouble" default="0" use="optional"/>
   <xs:attribute name="YOriginDelta" type="ST_nonPositiveDouble" default="0" use="optional"/>
   <xs:attribute name="Width" type="ST_nonNegativeDouble" default="0" use="optional"/>
   <xs:attribute name="Height" type="ST_nonNegativeDouble" default="0" use="optional"/>
   <xs:attribute name="OriginalText" use="optional" type="xs:string"/>
   <xs:attribute name="DropDownType" type="ST_enmFilterItemType" use="optional" default="None"/>
   <xs:attribute name="IsPivotPageField" type="xs:boolean" use="optional"/>
   <xs:attribute name="PageFieldID" type="xs:string" use="optional"/>
   <xs:attribute name="Drillable" type="xs:boolean" use="optional"/>
   <xs:attribute name="HasDrillIndicator" type="xs:boolean" default="false" use="optional"/>
   <xs:attribute name="CompactAxis" type="xs:boolean" default="false" use="optional"/>
   <xs:attribute name="ExtraIndentSpace" type="xs:boolean" use="optional"/>
   <xs:attribute name="WideIndent" type="xs:boolean" use="optional"/>
   <xs:attribute name="Expanded" type="xs:boolean" use="optional"/>
   <xs:attribute name="Horizontal" type="ST_enmHorizontalAlignment" default="Automatic" use="optional"/>
   <xs:attribute name="iconOnly" type="xs:boolean" use="optional"/>
   <xs:attribute name="FormulaError" type="xs:boolean" default="false" use="optional"/>
   <xs:attribute name="HasPhonInfo" type="xs:boolean" default="false" use="optional"/>
   <xs:attribute name="FormulaBarText" type="xs:string" use="optional"/>
   <xs:attribute name="HasSparkline" type="xs:boolean" default="false" use="optional"/>
   <xs:attribute name="SparklineClusterOffsetTop" type="xs:nonNegativeInteger" default="0" use="optional"/>
   <xs:attribute name="SparklineClusterOffsetLeft" type="xs:nonNegativeInteger" use="optional" default="0"/>
   <xs:attribute name="SparklineClusterFirstRow" type="ST_excelRowNumber" use="optional"/>
   <xs:attribute name="SparklineClusterLastRow" type="ST_excelRowNumber" use="optional"/>
   <xs:attribute name="SparklineClusterFirstColumn" type="ST_excelColNumber" use="optional"/>
   <xs:attribute name="SparklineClusterLastColumn" type="ST_excelColNumber" use="optional"/>
   <xs:attribute name="SparklineVersion" type="xs:int" use="optional" default="0"/>
 </xs:complexType>

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