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

Free Support Forum - aspose.com

How to copy a pivot table and how to change Pivot Tables Columns name


how to give the custom names to Columns in pivot table.

For example,

"Sum of Sales" is the pivot table's column name.

I want to change it to "Total sales".

Please if any one can provide property for this.

and Can we create a copy of Pivot table using Aspose code .

If yes , please provide sample code.



Thanks for your posting and using Aspose.Cells for .NET.

Please use the following code to change Sum of Sales to Total Sales.

pivotTable.DataFields[0].DisplayName = “Total sales”;

For copying pivot table, please elaborate your query more. We will look into it and help you asap.

Hi shakeel,

Thanks for your response.

My requirement is :

I have to create to pivot tables which refers the same range and I am also having some calculated fields in it.

One pivot table , i will show data according to Sales persons.

one pivot table - I have to show data according to date.

Now, In Aspose I have to write same code two times to create two pivot tables like to create calculated fields and to show data and the only change will be in Row filters.

So, Is there any way through code that we can use the same table and use it on different location.

I searched for pivotTable.Copy like kind of stuff but i did not find..

I hope you understand my point.

Please suggest, if you have any property and provide sample code if possible.

Thanks in advance


can anyone suggest on this isue.


Thanks for your posting and using Aspose.Cells for .NET.

We have looked into your issue and we are afraid, PivotTable.Copy() feature is not available. You will have to write your own code to achieve this functionality.