Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{introducedin: 8.4

...

Description

Excerpt

Sets or returns the ordering of the PivotTableField using an OrderingType. This only has an affect on row labels and column labels.

{signature}

{example}{code:csharp|title=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;
        
{code}
{code:vbnet|title=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;
        
Signature
C#C#
}{description}
{excerpt}Sets or returns the ordering of the {{[EW8:PivotTableField]}} using an {{[OrderingType|EW8:SortOptions.OrderingType]}}.  This only has an affect on row labels and column labels.
{excerpt}
{signature:C#}
 public SortOptions.OrderingType Ordering{ get; set; }
Signature
{signature}{signature:vb.net
vb.net
}
Public Property Ordering() As SortOptions.OrderingType
Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle
Remarks
ExcelWriter does not have the ability to perform the actual sorting action. This is handled by Excel when the output is opened in Excel and the PivotTable is refreshed. This property determines how Excel sorts the values for a particular PivotTable field.
{code}

{example}

{remarks}
ExcelWriter does not have the ability to perform the actual sorting action. This is handled by Excel when the output is opened in Excel and the PivotTable is refreshed. This property determines how Excel sorts the values for a particular PivotTable field.
{remarks}