Hi Claudio,
Thank you for updating us.
Changing pivot table source dynamically can be achieved by referring the Pivot table source to a named range. If the named range is modified, the property IsRefreshOnLoad in PivotCacheImpl has to be TRUE to refresh pivot table.
You can refer to the below code snippet to achieve this and also can refer to a simple sample from the following link.
Code Snippet:
PivotCacheImpl pivotCache = (workbook.PivotCaches[pivotTable.CacheIndex] as PivotCacheImpl); pivotCache.IsRefreshOnLoad = true; |
Sample : http://www.syncfusion.com/downloads/support/directtrac/131774/Sample-1006641213.zip
Please let us know if you need any clarification.
Regards,
Vikas