Contains options that define how a document is exported to XLSX format in the data-aware export mode.
public class XlsxExportOptionsEx : XlsxExportOptions, IDataAwareExportOptions
Public Class XlsxExportOptionsEx Inherits XlsxExportOptions Implements IDataAwareExportOptions
Specific controls (e.g., GridControl) support two export modes (data-aware export and WYSIWYG) when exporting their data to XLS and XLSX formats, while other controls only support WYSIWYG export mode.
Data-aware Export - The export mode optimized for subsequent analysis of a control's data within Microsoft Excel. Various data shaping options that are applied within the control are retained in the output XLS-XLSX documents.
This is the default export mode for specific controls (e.g., GridControl).
WYSIWYG Export - In this export mode, the layout of the control's cells is retained in resultant XLS-XLSX documents. Specific data shaping options are not retained, compared to data-aware export.
This export mode is supported by all controls that provide the export to XLS-XLSX formats capability.
A control's export using a PrintableComponentLink is performed in WYSIWYG export mode.
When exporting a GridControl in data-aware mode to XLS(x) format, the data shaping options retained in the output document include:
- Data grouping - with the capability to collapse/expand groups within a worksheet.
- Data sorting and filtering - allowing end-users to display relevant data in the desired order.
- Totals and group summaries - with the capability to modify/change formulas.
- Excel Style Format Rules
- Lookup values for columns that use Lookup and Combo-box editors.
- Fixed columns.
The following document was exported to MS Excel from a GridControl with grouping and summaries enabled.
To export data from a control to XLS and XLSX formats, use the ExportToXls and ExportToXlsx methods provided by the control. To take advantage of additional export customization capabilities available in data-aware export mode, use the ExportToXls(x) method overloads that take the options parameter.
This parameter should be set to XlsExportOptionsEx or XlsxExportOptionsEx objects (descendants of the XlsExportOptions and XlsxExportOptions classes). The Xls(x)ExportOptionsEx classes extend their base classes with additional options and events controlling the data-aware export. In the WYSIWYG export mode, the additional options and events provided by the Xls(x)ExportOptionsEx classes are not in effect.
The default export mode (data-aware or WYSIWYG) can be chosen with the static ExportSettings.DefaultExportType property. By default, it is set to ExportType.DataAware. You can use the ExportSettings.DefaultExportType property to disable data-aware export mode for controls that support this feature. Note that controls that do not support data-aware export mode ignore this setting.
The required export mode can be specified with each call of the ExportToXls(x) methods (when using these method overloads with the options parameter). Create an Xls(x)ExportOptionsEx object, set its Xls(x)ExportOptionsEx.ExportType property to ExportType.DataAware or ExportType.WYSIWYG value and pass this object to the ExportToXls(x) method. The ExportType property, when used, overrides the ExportSettings.DefaultExportType setting.
A few options that are inherited by the Xls(x)ExportOptionsEx classes from their base classes are not supported by the data-aware export engine. See the description of the classes' members to learn more.