Skip to main content

BeforeExportTableEventArgs.Table Property

Gets the object that encapsulates a native Excel table to which data is exported.

Namespace: DevExpress.Export

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public IXlTable Table { get; }

Property Value

Type Description
IXlTable

The object that encapsulates a native Excel table to which data is exported.

Example

The following example shows how to change the style of the native Excel table to which data is exported from a grid control.

Data-aware Export to native Table-example.png

using DevExpress.Export.Xl;
using DevExpress.XtraPrinting;

string path = "gridNative.xlsx";
XlsxExportOptionsEx options = new XlsxExportOptionsEx();
options.LayoutMode = DevExpress.Export.LayoutMode.Table;
options.BeforeExportTable += ea => {
    ea.Table.Style.Name = XlBuiltInTableStyleId.Medium1;
};
gridControl1.ExportToXlsx(path, options);
See Also