When using PivotTables in ExcelTemplate in OOXML files (XLSX, XLSM), the drop-down filters show data marker values:
The default PivotTable behavior is to cache the filter items, even when they are no longer in the data source.
To make sure that this cached information is cleared when the PivotTable refreshes:
- In your template file, right-click on the PivotTable and select PivotTable options
- Go to the Data tab.
- Under Number of items to retain per field select None from the drop-down.
Make sure that Refresh data when opening file is also checked so that the PivotTable refreshes with the imported data.
When you populate the file with data, the data markers should be gone from the drop-down: