L.2.9.3.4.5 Row Items

This collection is a listing of all the values on the row axis of the PivotTable. In the spreadsheet example, the item values are found in cells B10:B13. For example, “Bikes” is in B10, and corresponds to the first I element below.

<rowItems count="4">
  <i>
    <x/>
  </i>
  <i r="1">
    <x/>
  </i>
  <i r="1">
    <x v="1"/>
  </i>
  <i t="grand">
    <x/>
  </i>
</rowItems>

In the context of rowItems:

element for

In the context of i:

indicates how many fields/item values to “fill down” from the previous row item.

a default of

Note that the first item has no r explicitly written. Since item whose r is missing, a default value of 0 is implied.

is specified in the schema, for any

In the context of x:

Note that the first instance of x has no attribute value v associated with it, so v’s default value of 0 is implied.

Looking at the layout of the PivotTable in the spreadsheet for this example, “Bikes” is the first (and only) item value in the first row, in cell B10. In the XML defining the PivotTable row item values, the first I element corresponds to the first row. There is a single index element x. The first (and only) x element corresponds to the first field on the row axis, namely “Product Category”, and an index value of “0” indicates that the 0th item in the items collection for that pivotField definition is how to obtain the item value. Note that “Bikes” isn’t explicitly listed as a value here, but instead the 0th item is an index to this field’s shared items collection in the pivotCacheDefinition part.

For the second row, there are two item values, one item value (Bikes) from the first field in that row (Product Category) and one item value (Mountain Bikes) from the second field in that row (Product Subcategory). In the PivotTable, the first item value “Bikes” is hidden from view. In the XML for this example, the second I element expresses both item values for this row. The first item value “Bikes” is expressed implicitly, because the value of r on the second i element is 1, indicating that the first item value from the previous row is reused again as the first item value for the current row. The second item value is expressed explicitly via the x element under the second i element. The index of ‘0’ indicates that the 0th item in the pivotField element for that field is how to obtain the item value. Note again that the 0th item is itself an index into this field’s shared items collection in the pivotCacheDefinition part.

The item values for the third row can be discovered in a similar way, so is not discussed in detail here.

In the context of item:

Last updated on