blazor-devexpress-dot-blazor-dot-dxgrid-dot-exporttoxlsasync-x28-system-dot-io-dot-stream-devexpress-dot-blazor-dot-gridxlexportoptions-x29.md
Exports grid data to a stream in XLS format.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public Task ExportToXlsAsync(
Stream stream,
GridXlExportOptions options = null
)
| Name | Type | Description |
|---|---|---|
| stream | Stream |
The target stream for grid data export.
|
| Name | Type | Default | Description |
|---|---|---|---|
| options | GridXlExportOptions | null |
An object that contains export options.
|
| Type | Description |
|---|---|
| Task |
The task that is completed when the file is exported.
|
Call the ExportToXlsAsync method to export grid data in XLS format. The method overloads allow you to write the result to a stream (the current overload) or to a file downloaded to a client machine (ExportToXlsAsync(String, GridXlExportOptions)).
The method accepts a GridXlExportOptions object as a parameter. You can use this parameter to set up export settings.
For additional information about data export in the Grid component, refer to the following topic: Export Blazor Grid Data to XLS/XLSX.
If the grid is bound to a GridDevExtremeDataSource object, the following limitations apply:
See the following article for additional information about Microsoft Excel limitations (for example, row count and column count): Excel specifications and limits.
View Example: Export Images/Rich Text Using Spreadsheet Document APIs
ExportToXlsAsync(Stream, GridXlExportOptions)
See Also