Change the Data caption in Data field

Dear Aspose support team,

My requirement is need to change the "Data" caption in the Pivot Data field. But i cannot able to achieve it. Please provide the sample piece of the code to achieve it. Please refer the attached the screenshot for your reference.

Regards,

Saravanan

Hi,

I think you may try to use PivotField.DisplayName attribute for your need. e.g

pivotTable.DataField.DisplayName = “MyDataName”;
//OR
pivotTable.DataFields[2].DisplayName = “MyName”;

Thank you.