2.2.5.3.8.3 Pivot Lines
A pivot line specifies a collection of pivot line entries (section 2.2.5.3.8.4) for a single row or column (1) in the PivotTable (section 2.2.5) report.
Each range that is an intersection of one column (1) and cells from the column (1) area that have pivot items (section 2.2.5.3.3), data items (section 2.2.5.3.7.5.1), or a grand total is a pivot line of the column (1) area.
Each range that is an intersection of one row and cells from the row area that have pivot items, data items, or a grand total is a pivot line of the row area.
A pivot line is specified by the sequence of records that conforms to the SXLI rule (defined in section 2.1.7.40). The sequence of records that conforms to the SXLIRWS rule (defined in section 2.1.7.40) specifies the collection of pivot lines for the row area. The order of SXLI rules in SXLIRWS is the same as the top-to-bottom order of the pivot lines of the row area.
The sequence of records that conforms to the SXLICOLS rule (defined in section 2.1.7.40) specifies the collection of pivot lines for the column (1) area. The order of SXLI rules (defined in section 2.1.7.40) in the SXLICOLS rule is the same as the logical left to logical right order of pivot lines of the column (1) area.
Each pivot line contains a number of pivot line entries (section 2.2.5.3.8.4). The first number of pivot line entries are specified to be identical to those of the immediately preceding pivot line. These pivot line entries are not stored in the file for this pivot line. The number of pivot line entries that are identical to those of the immediately preceding pivot line is specified by the cSic field of the BrtBeginSXLI (section 2.4.251) record. Additional pivot line entries are specified by the BrtBeginIsxvis (section 2.4.98) record.
The first pivot line in the row area or the column (1) area MUST have a cSic field of its associated BrtBeginSXLI record equal to 0.
The following figure shows an example of how to construct pivot lines from an SXLIRWS rule (defined in section 2.1.7.40).
Figure 1: PivotTable and the table used to create each pivot line on the row axis
In this example, the table to the right contains the different components used to construct each pivot line (section 2.2.5.3.8.3), and the resulting pivot line. The first column (1) contains the value of the cSic field from each BrtBeginSXLI (section 2.4.251) in the SXLIRWS rule (defined in section 2.1.7.40). The second column (1) contains the array of pivot line entries (section 2.2.5.3.8.4) specified by the rgisxvis field in the BrtBeginIsxvis (section 2.4.98) record of each SXLI rule (defined in section 2.1.7.40).
The third column (1), labeled "Copied", represents the array of pivot line entries (section 2.2.5.3.8.4) of the previous pivot line that are to be copied to construct the current pivot line. The values in this column (1) are determined by copying the first n items, where n is equal to the value in the cSic column (1). If the value in the cSic column (1) is 0, no items need to be copied from the preceding pivot line.
The fourth column (1), labeled "Pivot Line", represents the final array of pivot line entries that make up the pivot line. This array is constructed by taking the union of the array in the "Copied" column (1) and the "rgisxvi" column (1), maintaining the order.