The full error is
Here is more of the code, I have a pivot table being loaded
I just found this in this forum, it is from you, your code and you have the same thing as me, so why doesn’t it work. WBT I do have 8.5.2 Here is your code
sheet2.Name = “Pivot_Chart”;
PivotTables pivotTables = sheet.PivotTables;
//Adding a PivotTable to the worksheet
int index = pivotTables.Add("=A1:C8", “E20”, “PivotTable1”);
//Accessing the instance of the newly added PivotTable
PivotTable pivotTable = pivotTables[index]; I realise yours has square brackets and mine has (), I had changed it to try it, doesn’t work either way. I get the error; “Can Not apply indexing with  to an expression of type Aspose.Cells.Pivot.PivotTable”
//Draging the first field to the row area.
//Draging the second field to the column area.
//Draging the third field to the data area.
index = sheet2.Charts.Add(ChartType.Pie, 0, 5, 10, 10);
sheet2.Charts[index].PivotSource = “Sheet1!PivotTable1”;
sheet2.Charts[index].HidePivotFieldButtons = false;
//Saving the Excel file
I can’t debug anything, it won’t compile. I have entered the complete procedure below, just copy it and paste it in a class, and you will see the errors. This is what this tread is all about. The error: “Can not apply indexing with  to an expression of type Aspose.Cells.Pivot.PivotTable”