Skip to main content
All docs
V25.1
  • DxViewer.ExportToAsync(ExportFormat) Method

    Asynchronously exports the document to a file in the specified format.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.Viewer.dll

    NuGet Package: DevExpress.Blazor.Viewer

    Declaration

    public virtual Task ExportToAsync(
        ExportFormat format
    )

    Parameters

    Name Type Description
    format ExportFormat

    An enumeration member that specifies the format of the exported file.

    Returns

    Type Description
    Task

    An asynchronous operation that exports the document to a file.

    Remarks

    Use this method to export a document to a file. The file name is the report’s Name property value. You can use the XtraReport.ExportOptions property to specify export options for the report.

    The following code exports a document to a file in XLSX format:

    await reportViewer.ExportToAsync(DevExpress.XtraPrinting.ExportFormat.Xlsx);
    

    For more information on document export, review the following help topic: Document Export Overview.

    See Also