Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Take special note of the data options, particularly Refresh data when opening the file and Number of items to retain per field.

Since ExcelWriter cannot render PivotTables on the server, if a PivotTable or PivotTable data source is modified with ExcelWriter, those changes will not be reflected until the PivotTable is refreshed. Therefore, we always encourage you to turn on Refresh data when opening the file or PivotTableSettings.RefreshOnOpen.

PivotTables by default retain all values that are included in the data source, starting from the original values, and makes them available in various drop-downs and selections. In the case of ExcelTemplate, this means that data markers will appear in parts of the PivotTable, even after it has refreshed. To make sure that old values are cleared out when the PivotTable is refreshed, make sure to set Number of items to retain per field to None, or PivotTableSettings.ItemsToRetain to ItemsToRetain.None.

PivotTable Field

PivotTable Field Settings

...