GridControl.ExportToExcel(Stream, ExportTarget) Method

Exports data from the grid to the specified stream in the XLS, XLSX or CSV format.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll


public bool ExportToExcel(
    Stream stream,
    ExportTarget format
Public Function ExportToExcel(
    stream As Stream,
    format As ExportTarget
) As Boolean


Name Type Description
stream Stream

A Stream object, to which the created document is exported.

format ExportTarget

An ExportTarget value specifying the format to export grid data.


Type Description

true, if export is successfully completed; otherwise, false.



This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

To set options for exporting data from the grid to the XLS, XLSX or CSV format, use the GridControl.OptionsExportXls, GridControl.OptionsExportXlsx or GridControl.OptionsExportCsv property respectively.

See Also