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
:
<i>
expresses all the values (for all fields) in one row of the row axis. There will be an<I>
In the context of @i
:
@r
Note that the first item has no @r
explicitly written. Since a default of "0
" is specified in the schema, for any item whose @r
is missing, a default value of "0
" is implied.
In the context of @x
:
@v
<pivotField>
<x>
elements as there are item values in any particular row. Note that these<x>
elements may not be explicitly written, but instead "inherited" from the previous row/<i>
element, via the value of@r
. Note also that the pivotField items don't list values explicitly, but instead reference a shared item value in the pivotCacheDefinition part.
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 will be 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 will not be discussed in detail here.
In the context of @item
:
@t
value of 'default
' indicates a grand total as the last row item value.