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


Type Name Description
Stream stream

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

ExportTarget format

An ExportTarget value specifying the format to export grid data.


Type Description

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


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