Home Pivot Table Freezes when data range changed at runtime .net
Reply: 0

Pivot Table Freezes when data range changed at runtime .net

user839
1#
user839 Published in April 23, 2018, 9:23 am

I have created pivot table in Excel as template. And changing data source at runtime to get update report. dataRange is changed at runtime in VB.NET.

Dim cache1 As Excel.PivotCache = workBook.PivotCaches.Add(SourceType:=Excel.XlPivotTableSourceType.xlDatabase, SourceData:=dataRange)
pivotTable.SaveData = True
pivotTable.ChangePivotCache(cache1)
pivotTable.PivotCache().Refresh()

Once Pivot table is updated, it freezes , no right click operation is working. In pivot table it has grouping. So Tree expand collapse also freezes.

When I manually perform refresh then everything starts working.

I have refreshed pivote table and it’s cache

pivotTable.RefreshDataSourceValues()
pivotTable.PivotCache().Refresh()

What I am missing here?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.499579 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO