I am unable to add a pivot table to a worksheet. I have code which is the same as the samples, see below:
int pivotIndex = pivotSheet.PivotTables.Add("=Data!A1:O102", “A1”, “PivotTable1”)
But when it throws an exception “The PivotTable field name is invalid.”.
I am using version 220.127.116.11.
How does one add a pivot table to a sheet?