2.1.792 Part 4 Section 22.214.171.124, i (Row Items)
a. The standard does not specify restrictions on the i attribute.
Office specifies that the i attribute should be 0 if the dataFields collection is empty and should be less than number of elements in that collection otherwise.
b. The standard states that a value of default on the t attribute indicates a grand total as the last row item value.
Excel uses the definition from the ST_ItemType simple type for the definition of this value.
c. The standard does not place restrictions on the value of the r attribute.
In Office, if the r attribute is not 0, then the sum of the r attribute and number of x attribute elements must be less or equal to the number of elements in the rowFields or colFields collections, depending on context. The r attribute shall not exceed the number of items in the previous row item.
d. The standard does not specify the relationship of x elements to pivotFields.
Office defines the relationship between x elements and pivotFields as follows:
The v attribute of the x element shall be 1048832 (specifying that no item appears at this position) or a valid item index in its pivot field.
The axis index, of a child item x, is calculated as the value of r plus the index of the x element within the collection in this element. The field index is calculated as given by the x attribute of the field element, at the position given by the axis index, in either the colFields element (“[ECMA-376] Part 4 §126.96.36.199; colFields (Column Fields)”), if the parent of this element is colItems, or the rowFields element (“[ECMA-376] Part 4 §188.8.131.52; rowFields (Row Fields)”), if the parent of this element is rowItems.
If the field index is -2 valid item indexes, for the v attribute of the x child, shall be less than the number of elements in the dataFields collection (“[ECMA-376] Part 4 §184.108.40.206; dataFields (Data Fields)”). Otherwise valid item indexes, for the v attribute of the x child, shall be less than the number of elements in the items collection (“[ECMA-376] Part 4 §220.127.116.11; items (Field Items)”) of the pivotField, at the index given by the field index in the pivotFields (“[ECMA-376] Part 4 §18.104.22.168; pivotFields (PivotTable Fields)”).