Set number format with 3 decimal places to pivot field in .NET

Hi Aspose Support team,
I have the requirement like the data field format should be 3 decimal places. I have achieved this requirement with 2 decimal places using the following sample code:

PivotField pivotDataField1 = pivotTable.DataFields[0];
pivotDataField1.Function = ConsolidationFunction.Average;
pivotDataField1.Number = 2;

and i have refered the following link:

I have also attached the Expected.JPEG(3 decimal places) and Actual.JPEG(2 decimal places) for your kind reference.

Please help me or provide the sample code to achive this feature.


Thanks in advance.

Regards,
Saravanan.

Hi,


Please use NumberFormat attribute instead, e.g

pivotDataField1.NumberFormat = “0.000”;