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.v20.1.Core.dll

Declaration

public LayoutMode LayoutMode { get; set; }
Public Property LayoutMode As LayoutMode

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.

Examples

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);

Implements

DevExpress.Export.IDataAwareExportOptions.LayoutMode
See Also