I’m developing a Microsoft.Office.Interopt.Excel app in asp.net/C#/.net 3.5, using VS 2008.
I’m trying to refresh a pivot table but the
The following statement won’t compile .
wkSheet.PivotTables("PivotTable1").PivotCache.Refresh;
I keep getting the following 2 erros. Can someone please help!
1.Only assignment, call, increment, decrement, and new object expressions can be used as a statement
2.'object' does not contain a definition for 'PivotCache' and no extension method 'PivotCache' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
Both of those messages are kind off clear, try something like: