我正在使用 VS 2008 在 asp.net/C#/.net 3.5 中开发 Microsoft.Office.Interopt.Excel 应用程序。
我正在尝试刷新数据透视表,但以下语句无法编译。
wkSheet.PivotTables("PivotTable1").PivotCache.Refresh;
我不断收到以下2个错误。有人可以帮忙吗!
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?)