ColumnItems Class

Column Items.When the object is serialized out as xml, its qualified name is x:colItems.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


<ChildElementInfoAttribute(GetType(RowItem))> _
Public Class ColumnItems _
    Inherits OpenXmlCompositeElement
Dim instance As ColumnItems
public class ColumnItems : OpenXmlCompositeElement


The following table lists the possible child types:

  • RowItem <x:i>

[ISO/IEC 29500-1 1st Edition] colItems (Column Items)

Represents the collection of column items of the PivotTable.

[Example: In the following SpreadsheetML example the item values are found in cells C6:H8. For example "2001" / "3" / "July" values are in C7:C9. Those are the first column item values and are referenced by the first <i> element below.

<colItems count="5">
  <i r="2">
<x v="1"/>
  <i r="2">
<x v="2"/>
  <i t="default" r="1">
  <i t="default">

end example]

The first <i> collection represents all item values for the first column in the column axis area of the PivotTable. The first <x> in the first <i> corresponds to the first field in the columns area of the PivotTable, namely "Year". The implied index value of '0' on this <x> indicates that the item value for this first item in the column is the 0th item for this pivotField. The 0th item for this pivotField is itself an index to an item value into this field's shared items collection in the pivotCacheDefinition part, namely "2001".

The item values corresponding to the second and third <x> elements can be found in the same way, arriving at "3" for the second item value, and arriving at "July" for the third item value for this first column.

The second <i> collection expresses all 3 item values for the second column in the column axis area. The *@r* value of '2' indicates that the first two item values from the previous column is repeated here, which means that the first item value for this second column is "2001" again and the second item value for this second column is "3". The third item value is expressed by the only <x> element under this second <i> element, and without further explanation is understood to reference the item value "August".

Parent Elements

pivotTableDefinition (§

Child Elements


i (Row Items)




count (Column Item Count)

Specifies the number of items on the column axis of the PivotTable.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_colItems) is located in §A.2. end note]

© ISO/IEC29500: 2008.

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


ColumnItems Members

DocumentFormat.OpenXml.Spreadsheet Namespace