Worksheet ws = (Worksheet)pivotTableWorkBook.Worksheets.Item[1];
Range pivotData = ws.Range["A1:N82009"];
Range pivotDestination = ws.Range["Q4"];
string pivotTableName = "Call Cycle Pivot Table";
PivotCache pivotCache = pivotTableWorkBook.PivotCaches().Add(XlPivotTableSourceType.xlDatabase, pivotData);
//PivotTable pivotTable = ws.PivotTables().Add(pivotTableName, pivotDestination, pivotCache);
PivotTable pivotTable = ws.PivotTables().Add( pivotTableName, pivotDestination, pivotCache);
I was creating a pivot table through Selenium Csharp, but suddenly I encountered this error. Tried a lot to fix it but failed. Please help me to solve this. The code which I shown above is Microsoft interop