Skip to main content

XlsExportOptionsEx.LayoutMode Property

Gets or sets whether data is exported in regular mode or as a native Excel table.Only available in data-aware export mode.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

[XtraSerializableProperty]
public LayoutMode LayoutMode { get; set; }

Property Value

Type Description
DevExpress.Export.LayoutMode

A value that specifies whether data is exported in regular mode or as a native Excel table. The default value is Standard.

Remarks

For more information, see XlsxExportOptionsEx.LayoutMode.

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