Refresh a pivot table

Hi,

I have the following scenario: Using a templet with an existing pivot table.

I import some data to the templet then I need to refresh the pivot table to reflect the new data and then I need to copy the data from the pivot table into a new tab (new worksheet).

I am able to :

1) Import the data

2)Change the pivot data source (to reflect new range)

but I can not copy the output of the pivot table into another tab.

I use

pivotable.RefreshData()

It doesn't refresh the pivot

If I use

pivotable.RefreshDataOnOpeningFile = True

it works when I open the spreadsheet but I don't want to open the spreadsheet because more processing needs to be done with the output of the pivot table

How can I do this ?

Hi,


Please download and try the latest version: Aspose.Cells for .NET v7.0.2.1

If you still find the issue, kindly create a sample console application, zip it and post it here to show the issue, we will check your issue soon.

Please also use CalculateData method with RefreshData method if you need to calculate the pivot table data.
pivotable.RefreshData()
pivotable.CalculateData()


Thank you.

That solved the problem

using:

pivotable.RefreshData()

pivotable.CalculateData()

Thank you