Formatting numbers in a Pivot Table

Hello,

How can I format numbers in a pivot table in order to remove the numbers after the decima point.

Thanks a lot.

Henri


This message was posted using Aspose.Live 2 Forum

Hi,

Well, I think you may try to use PivotField.Number and PivotField.NumberFormat properties.

E.g.,

pivotTable.DataFields[0].NumberFormat = "0";

OR

pivotTable.DataFields[0].Number = 1;

Thank you.

I don’t have the NumberFormat property. I do have the number property. Is it my version of ASPOSE : 4.4.0.3.

When I use : pivotTable.DataFields[0].Number = 1, it removes the decimal point but I loose the thousands separator.

Hi,

Please check the wiki

if you use Number property.

Or you can user PivotField.NumberFormat string property to custom the number format.

Thanks a lot. This realy helped.

Henri