Skip to main content
Tab

ASPxGridExporterBase.WriteXlsToResponse(String, Boolean, XlsExportOptions) Method

Exports the grid’s data to the specified file in XLS format with the specified export settings, and writes it to the Response in binary format.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public void WriteXlsToResponse(
    string fileName,
    bool saveAsFile,
    XlsExportOptions exportOptions
)

Parameters

Name Type Description
fileName String

A String value that specifies the target file name.

saveAsFile Boolean

true to display the File Download dialog; false to display the XLS file with exported data within a page.

exportOptions XlsExportOptions

A XlsExportOptions object that provides export options.

Remarks

Note

Before exporting a grid, the ASPxGridExporterBase component creates an export document on a server. Therefore, when you export a large amount of data to a server with limited memory, the OutOfMemoryException exception may appear.

ASPxGridViewExporter1.WriteXlsToResponse("test.xls", true, new XlsExportOptions() { ExportMode = XlsExportMode.DifferentFiles }); 
See Also