We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding PivotTables fails with exception "The PivotTable field name is invalid" in .NET


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

How does one add a pivot table to a sheet?



Please download and try our latest fix/version: Aspose.Cells for .NET v7.4.0.4 and let us know your feedback.

If you still find the issue, kindly create a sample console application, zip it and post it here to reproduce the issue on our end. Also, attach your template file (input file) if you have any. We will check your issue soon.

Thank you.