How to Prevent External PivotTable References in Copied Excel Workbooks
Question details
The user needs to stop PivotTables in duplicated workbooks from referencing the original file's data source through the pivot cache.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Copying or renaming an Excel workbook that contains PivotTables linked to local tables or named ranges.
- Observed behavior
- The PivotTable's cache retains external links to the older version of the workbook, causing the new workbook to reference the original file instead of its own local data.
Verify your PivotTable data source by going to PivotTable Analyze > Change Data Source to confirm whether it is currently pointing to an external file path or a local table name.
Clear PivotTable Cache Items
Adjusting the PivotTable options to stop retaining deleted items is the most effective way to clear old cache links without using VBA.
PivotTables save a copy of the source data in a hidden cache to improve performance. When you copy a workbook, this cache can sometimes hold onto the original file path. Setting the 'Number of items to retain per field' to 'None' forces the PivotTable to drop cached data and rely purely on the current local source.
Right-click anywhere inside your PivotTable and select 'PivotTable Options' from the context menu.
Navigate to the 'Data' tab within the Options dialog box.
Locate the dropdown menu for 'Number of items to retain per field' and change it from 'Automatic' to 'None'. Click OK to apply.
Save the workbook, close it, and reopen it. Right-click the PivotTable and select 'Refresh' to rebuild the cache using the local data.

Use Structured Table References Instead of Named Ranges
Avoid dynamic named ranges for your source data to prevent Excel from reverting to external file paths.
Recreate the PivotTable
If adjusting the cache settings fails, creating a completely new PivotTable will generate a fresh, unlinked cache.
Manage PivotTables and Data Sources Effortlessly in WPS Spreadsheet
WPS Spreadsheet provides powerful and intuitive PivotTable tools, making it easy to manage data sources, clear cache memory, and prevent unwanted external links when duplicating workbooks.
- 1. Open Your Workbook: Launch WPS Spreadsheet and open the copied workbook containing your PivotTables.
- 2. Access PivotTable Options: Right-click the PivotTable and choose 'PivotTable Options' from the context menu.
- 3. Clear the Cache: Go to the Data tab, set 'Number of items to retain per field' to None, and click OK.
- 4. Refresh Data: Right-click the PivotTable again and select 'Refresh' to update the cache to the local file.

Frequently Asked Questions
Why does my copied Excel workbook still ask to update external links?
This usually happens because a PivotTable cache, a hidden named range, or a specific formula still references the original file's path. Clearing the PivotTable cache and checking the Name Manager can resolve this.
What does 'Number of items to retain per field' do?
This setting determines whether data items that have been deleted from your source data remain visible in your PivotTable filter drop-downs. Setting it to 'None' forces the PivotTable to forget outdated or external data.
How do I find hidden external links in my workbook?
You can find external links by going to the Data tab and clicking 'Edit Links'. If the option is grayed out, check your PivotTable data sources and the Name Manager (Formulas > Name Manager) for any paths pointing to other workbooks.




