The Fundamental Properties

The PivotField object has a handful of basic properties that you will almost always want to set. 20.7.3.1 Function property

This property applies only to data fields and returns or sets the aggregate function used to summarize the pivot field. It can be one of the following XlConsolidationFunction constants:

Enum XlConsolidationFunction xlVarP = -4165 xlVar = -4164 xlSum = -4157 xlStDevP = -4156 xlStDev = -4155 xlProduct = -4149 xlMin = -4139 xlMax = -4136 xlCountNums = -4113 xlCount = -4112 xlAverage = -4106

xlUnknown = 1000 ' Excel 9 only

End Enum

20.7.3.2 NumberFormat property

This property applies only to data fields and returns or sets the formatting string for the object. Note that it will return Null if all cells in the specified range do not have the same number format. This is a read-write string property.

20.7.3.3 Orientation property

This property returns or sets the orientation of the pivot field. It can be set to one of the following values:

Enum XlPivotFieldOrientation xlHidden = 0 xlRowField = 1 xlColumnField = 2 xlPageField = 3 xlDataField = 4 End Enum

20.7.3.4 Position property

This read-write property returns or sets the position of the pivot field among all pivot fields in the same area (row, column, page, or data).

0 0

Post a comment