Skip to main content
A newer version of this page is available. .

XtraReport.ExportToXlsx(Stream, XlsxExportOptions) Method

Exports a report to the specified file path in XLSX format using the specified XLSX-specific options.This method exports data in WYSIWYG mode. Certain controls (e.g., a GridControl) can be exported to XLS(XLSX) format in a faster data-aware export mode, optimized for subsequent analysis of data in MS Excel. To learn how to employ data-aware export, see Export to XLS and XLSX Formats.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public void ExportToXlsx(
    Stream stream,
    XlsxExportOptions options
)

Parameters

Name Type Description
stream Stream

A Stream object to which the created XLSX file should be sent.

options XlsxExportOptions

A XlsxExportOptions object which specifies the XLSX export options to be applied when a report is exported.

Remarks

Once the document export has started, it will run until the resulting document is complete and cannot be interrupted or canceled in the process.

Use this method to export a report in XLSX format using its current XLSX-specific export options, e.g. XlExportOptionsBase.ShowGridLines, XlExportOptionsBase.SheetName, etc. For a list of these options, and more information on using the ExportToXlsx method, refer to Export to XLSX.

Note that in this instance, the current report export options represented by the XlsxExportOptions object returned by the ExportOptions.Xlsx property of a report’s XtraReport.ExportOptions, are ignored.

If, instead, you want to use the current export options of a report, you should call the overloaded XtraReport.ExportToXlsx method without the options parameter.

Note

This method overwrites any files present at the specified path that have the same file name without warning.

See Also