A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi Pooja,
Thank you for the clear description confirming that in Excel 2608 your Office Add-in completes the update of the source data successfully, yet the PivotTable-dependent worksheets continue to display stale values, while the identical flow behaves correctly in Excel 2606 and 2607.
This behavior occurs because Excel 2608 changed the timing of the PivotTable refresh pipeline, so PivotTable.refreshAll() now returns once the refresh has been queued rather than once the PivotCache has been fully rebuilt and written back to the sheet. Any code that reads or copies values immediately after that call runs against the previous cache state, which is why the dependent Workpaper worksheets keep the earlier values even though the update itself reported success.
Below are some workarounds that suit the situation:
1/ Enforce a synchronized refresh and recalculation sequence in your add-in
- In your update routine, call
PivotTable.refreshAll()as you do today, then immediately callawait context.sync()so the queued refresh is committed to the workbook. Work with PivotTables using the Excel JavaScript API - Load the PivotTable collection explicitly, iterate through each PivotTable, and call
refresh()on each one individually, then callawait context.sync()again. Individual refresh calls give Excel a defined completion point per PivotTable. - After the second sync, force a full recalculation with
context.workbook.application.calculate(Excel.CalculationType.fullRebuild), followed by a finalawait context.sync(). - Only after this final sync, read or copy the values into the dependent worksheets. This ordering guarantees that the PivotCache, the formulas, and the dependent ranges are all in a settled state before your downstream logic executes.
- References: Excel JavaScript object model in Office Add-ins, including load and synchronization behavior
2/ Take manual control of the calculation mode during the update cycle
- At the start of the update process, set
context.workbook.application.calculationMode = Excel.CalculationMode.manualand sync. - Perform your source data write operations and the PivotTable refresh steps described in Solution 1.
- Open each PivotTable definition in the workbook, go to PivotTable Analyze, then Options, then Data, and confirm that background refresh is disabled for every external or query-based PivotTable. Background refresh returns control to your code before the data arrives. Refresh PivotTable data, including background refresh and layout options
- Also confirm that Defer Layout Update is cleared on each PivotTable, because a deferred layout suppresses the visible value update even after a successful refresh.
- Trigger
fullRebuild, Sync, then set the calculation mode back to automatic and sync a final time. This removes any dependency on Excel's internal recalculation timing. Change formula recalculation, iteration, or precision in Excel
3/ Add a validation checkpoint and keep a supported fallback while the investigation proceeds
- Before your dependent worksheet logic executes, read one known cell from each PivotTable value area and compare it against the value you just wrote to the source sheet.
- If the comparison does not match, apply a short retry loop, for example, three attempts with a delay of 300 to 500 milliseconds, each attempt calling
refresh()andcalculate(fullRebuild)again before rereading the checkpoint cell. - Log the build number, the PivotTable name, and the checkpoint result on each attempt, since this data will strengthen the engineering review of the version difference.
- If your production timeline requires immediate stability, pin the affected machines to the Excel 2607 build through the Office Deployment Tool using the Version attribute in your configuration XML, and lift that pin once a corrected build is confirmed. How to revert to an earlier version of Microsoft 365 Apps
Alternatively, as a user-to-user support forum, I hope you understand that I can't modify product behavior or raise development changes directly with the engineering team through this channel. However, Microsoft frequently restores previous behavior once enough customers report the same impact, so I strongly recommend submitting your report through the Excel · Community, describing the difference between build 2607 and build 2608 and the effect on your PivotTable dependent worksheets. This is the most effective way to ensure your experience reaches the product team and can be considered for future updates.
You've clearly identified a real-world challenge, and your suggestion reflects a deep understanding of user needs - feedback like yours is truly valuable and helps shape the future of Microsoft Teams.
Once you’ve submitted your feedback, feel free to share the link here. I’d be happy to upvote it to help increase its visibility.
Additionally, as other users have raised similar concerns and may not be aware of where to share their feedback, I hope this response helps clarify the situation and suggests a potential next step. Highlighting this information can make it more visible to others in the community who may be facing the same issue, making it easier for them to find guidance and contribute their feedback as well.
Thank you again for your time and for raising this important usability concern. If you have any further questions or need additional assistance, please don’t hesitate to reach out.
Wishing you a smooth rest of your day.
If the answer is helpful, please click "Yes". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.