Currently we are allowed to insert Excel tables via the JS API, I'm allowing users to insert tables for reporting purposes. The easiest way of making sense of table data is to create a Pivot Table off of it.
I'd really love to see the JS API be enhanced to allow Pivot Tables to be refreshed via the Office JS API.
At first a simple "Refresh All Pivots" method would be awesome as then I could automatically refresh Pivot Tables and Charts inside my users workbooks - allowing them to get instant updates on what their data looks like in a meaningful manner.
Michael, thanks for the feedback! This feature is coming to Excel1.3 requirement set. You can test this in “beta” version today. See https://github.com/OfficeDev/office-js-docs/blob/ExcelJs_1.3_OpenSpec/reference/excel/pivottable.md#refresh.
Office Extensibility Team
Marshall Rosenstein commented
I need exactly this feature. The API allows you to dynamically load data into a table (via a binding), but you can't refresh any pivot tables that actually use the updated table data. Currently, this has to be done manually after you use the API to load new data.