This project has moved and is read-only. For the latest updates, please go here.

Refresh Pivot Tables

Nov 23, 2011 at 1:24 PM


I clear out and then re-populate a raw data tab in my excel file. After I'm done populating that tab, I'd like to refresh all the pivot tables that are based on that source. I then stream it to the web user with this. Problem is the pivot tables do not reflect the new data. How could I force a refresh of the pivot tables so the user will see the updates?

Dim fileBytes As [Byte]() = pck.GetAsByteArray()

Thanks so much. BTW, excellent pakcage !
Nov 28, 2011 at 6:32 AM

I think you have a setting on the pivottable in Excel to refresh when the workbook is loaded

Nov 28, 2011 at 12:33 PM

Hi Jan,

There is indeed a checkbox that says to refresh the pivot tables upon opening. However, the excel file is already open because I am re-populating the raw data which feeds the pivot tables. So they don't automatically refresh. Somehow I would need to force a refresh, but not sure how I can code it to make that happen. The only thing I could do would be to update it, save it and then close the Excel file and then re-open it and then stream it to the browser. However I'd prefer to not to assign write permissions and also the process would take too long. Thoughts?