Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

LinkBase.ExportToXls(Stream) Method

Exports a report to the specified stream in XLS format.

Namespace: DevExpress.Xpf.Printing

Assembly: DevExpress.Xpf.Printing.v24.2.dll

NuGet Package: DevExpress.Wpf.Printing

#Declaration

public void ExportToXls(
    Stream stream
)

#Parameters

Name Type Description
stream Stream

A Stream object to which the created XLS file should be sent.

#Remarks

Once the document export has started, it will run until the resulting document is complete and cannot be interrupted or canceled in the process.

The following two modes of Excel export are available.

  • Data-Aware Export

    This export mode is optimized for subsequent data analysis within Microsoft Excel. Various data shaping options that are applied within the control are retained in the output XLS-XLSX documents (such as native Excel grouping, sorting and filtering settings, as well as improved support for Excel formulas).

    The LinkBase class does not support this export mode and to use the data-aware export, it is required to call the corresponding methods of specific controls (e.g., GridControl).

  • WYSIWYG Export

    With this export mode, the layout of a control’s cells is retained in the resulting Excel documents while specific data shaping options may not be retained.

    This is the only export method that is supported by the LinkBase class.

See Also