Introduced in build 8.4
Description
Sets or returns the ordering of the PivotTableField
using an OrderingType
. This only has an affect on row labels and column labels.
C#
public SortOptions.OrderingType Ordering{ get ; set ; } |
vb.net
Public Property Ordering() As SortOptions.OrderingType |
Examples
C#
ExcelApplication xla = new ExcelApplication(); Workbook wb = xla.Open( "template.xlsx" ); PivotTable pt = wb[0].PivotTables[0]; pt.ColumnLabels[0].SortOptions.Ordering = SortOptions.OrderingType.Ascending; |
vb.net
Dim xla As New ExcelApplication() Dim wb As Workbook = xla.Open( "template.xlsx" ) Dim pt As PivotTable = wb(0).PivotTables(0) pt.ColumnLabels(0).SortOptions.Ordering = SortOptions.OrderingType.Ascending; |