...
To add a PageField
, call CreateField
on the PivotTable.PageFields
collection. You will need to specify the SourceField
that will be used to create the PageField
.
Code Block |
---|
INSERT PageField CODE HERE pivot.PageFields.CreateField(dateStart); pivot.PageFields.CreateField(dateEnd); |
Info |
---|
Page fields are always placed two rows above the upper left corner of the PivotTable, so if a PivotTable is placed in cell B10, then page fields will be in B8. Any additional page fields are added to B8 and existing page fields are moved up a row (B7, B6 and so on). If there is no space to add the page fields above the PivotTable (i.e. the PivotTable is located in cell A1), then ExcelWriter will automatically move the PivotTable down to accommodate the page fields. |
...