Back to Devexpress

PivotGridXlsExportOptions Class

wpf-devexpress-dot-xpf-dot-pivotgrid-9275df27.md

latest3.0 KB
Original Source

PivotGridXlsExportOptions Class

Contains export options specific to XLS format.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public class PivotGridXlsExportOptions :
    XlsExportOptionsEx,
    IPivotGridExportOptions,
    IDataAwareExportOptions
vb
Public Class PivotGridXlsExportOptions
    Inherits XlsExportOptionsEx
    Implements IPivotGridExportOptions,
               IDataAwareExportOptions

Remarks

To apply export options, create the PivotGridXlsExportOptions instance, specify the properties, and pass the PivotGridXlsExportOptions object as a parameter to the PivotGridControl.ExportToXls method:

csharp
//...
void Button_Click(object sender, RoutedEventArgs e) {
    PivotGridXlsExportOptions op = new PivotGridXlsExportOptions();
    op.CustomizeCell += op_CustomizeCell;
    pivorGrid1.ExportToXls(filePath, op);
}
vb
'...
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim op As New PivotGridXlsExportOptions()
    AddHandler op.CustomizeCell, AddressOf op_CustomizeCell
    pivorGrid1.ExportToXls(filePath, op)
End Sub

You can use this object’s members to specify whether to include Pivot Grid field headers in the exported document:

Inheritance

Object ExportOptionsBase PageByPageExportOptionsBase XlExportOptionsBase XlsExportOptions XlsExportOptionsEx PivotGridXlsExportOptions

See Also

PivotGridXlsExportOptions Members

DevExpress.Xpf.PivotGrid Namespace