How to set pivot tables' value fields (Display names/settings etc) using Aspose

Is there a way of setting the name displayed for pivot tables’ value fields (see attachment) using Aspose cells ? In Excel one simply right-click the fields and set a custom name.


Thanks

Hi,


Thanks for the screenshot.

See the sample lines of code for your reference:
e.g
Sample code:

//Set the consolidation function for the first data field in the PivotTable.
pivotTable.DataFields[0].Function = ConsolidationFunction.Sum;

//Change the display name for the first data field.
pivotTable.DataFields[0].DisplayName = “Test Caption”;

Hope, this helps a bit.

Thank you.

That’s spot-on!


Thanks