Pivot Table Issues

Fix GETPIVOTDATA Returning Zero When Source Workbook is Closed

Chanuka GeekiyanageChanuka Geekiyanage Nov 10, 2026 869 views

Question details

The GETPIVOTDATA function returns a value of zero instead of the correct data when the external source workbook it links to is closed.

How to Fix GETPIVOTDATA Returning Zero When Source Workbook is Closed
Product
Spreadsheet
Device & OS
not provided
Scenario
Extracting data from an external PivotTable source file using the GETPIVOTDATA function across consolidated workbooks.
Observed behavior
Formulas show the correct values when both files are open but revert to zero as soon as the password-protected source workbook is closed.
Before you start

Ensure you have the password for the protected source workbook, as you will need to open it temporarily to adjust the data connection and caching settings.

Solution 1Recommended

Enable PivotTable Data Caching and Refresh

Configure your PivotTable connection properties to retain the data cache so information remains available even when the source file is closed.

By default, PivotTables rely on an active connection to their source data. If the source file is password-protected, the destination workbook cannot pull the data in the background once the file is closed. Enabling data caching embeds the most recent data snapshot into the file.

1
Open both workbooks

Open both the consolidated destination workbook and the password-protected source workbook simultaneously in your spreadsheet application.

2
Access PivotTable Options

Right-click anywhere inside the PivotTable located in the source workbook and select 'PivotTable Options' from the context menu.

3
Enable data caching

Navigate to the 'Data' tab in the options dialog box and check the box labeled 'Save source data with file'.

4
Refresh and save

Manually refresh the PivotTable data while the source file is still open, then save both workbooks to preserve the cached data state.

Enable PivotTable Data Caching and Refresh
Data Preserved: The consolidated sheet will now rely on the cached data snapshot, preventing the GETPIVOTDATA formulas from returning zero.
Advanced Data Management

Seamlessly Manage PivotTables and External Links with WPS Spreadsheet

WPS Spreadsheet provides powerful tools to manage PivotTables, configure data caching, and handle cross-workbook references without losing your data. Enjoy high compatibility with Microsoft Excel formats and advanced data analysis features entirely for free.

  1. 1. Download and Install: Get WPS Office for free and open your consolidated and source workbooks in WPS Spreadsheet.
  2. 2. Manage PivotTable Options: Right-click your PivotTable, select 'Options', and ensure 'Save source data with file' is enabled under the Data tab.
  3. 3. Update Links Securely: Navigate to the Data tab and use the 'Edit Links' feature to manage and refresh external workbook connections efficiently.
  4. 4. Save Safely: Save your progress in universally compatible formats like .xlsx to ensure your GETPIVOTDATA formulas remain intact for all users.
Retain external link values with highly reliable data caching configurations.Seamless compatibility with Microsoft Excel (.xlsx) PivotTables and external links.Free, lightweight, and user-friendly interface for complex data analysis tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why do external links break when the source file is password-protected?

Password-protected workbooks prevent external applications from accessing their data in the background. The file must be actively opened and decrypted for formulas like GETPIVOTDATA to pull the latest values, otherwise they default to zero or an error.

Can I use GETPIVOTDATA without opening the source file?

Yes, but only if the source file is not password-protected and the PivotTable data cache has been saved within the file. If these conditions are not met, the formula cannot verify the external data map.

Is there an alternative to GETPIVOTDATA for external links?

You can use standard direct cell references (e.g., ='[Source.xlsx]Sheet1'!A1) or a combination of INDEX and MATCH functions. However, if the source workbook is password-protected, even these standard references may require the source file to be open to update correctly.