Free Support Forum -

Modify PivotTable in template file

Dear Guys,

I need to access existing PivotTable object in excel template file in order to modify some of PivotTable properties.

Here is part of my code that's not working:

Dim worksheet As Worksheet = workbook.Worksheets("Summary")
Dim pts As PivotTables
pts = worksheet.PivotTables
For i As Integer = 0 To pts.Count - 1'PROBLEM PART:pts.Count returned 0
pts(i).SaveData = False

I've gone through your sample library regarding PivotTable, all of your sample code is related to Add newly created PivotTable object to excel file. By generating PivotTable using your library, processing time is taking too long for calculating pivot with more than 30000 rows.

Any comment is very highly appreciated.


This message was posted using Aspose.Live 2 Forum


We do not support reading PivotTables in the template file. We only keep them and save them to the file.