Back to Devexpress

SankeyDiagramControl.ExportToXlsx(Stream, XlsxExportOptions) Method

windowsforms-devexpress-dot-xtracharts-dot-sankey-dot-sankeydiagramcontrol-dot-exporttoxlsx-x28-system-dot-io-dot-stream-devexpress-dot-xtraprinting-dot-xlsxexportoptions-x29.md

latest3.2 KB
Original Source

SankeyDiagramControl.ExportToXlsx(Stream, XlsxExportOptions) Method

Creates an XLSX document with the diagram inserted as an image and sends it to a stream.

Namespace : DevExpress.XtraCharts.Sankey

Assembly : DevExpress.XtraCharts.v25.2.UI.dll

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public void ExportToXlsx(
    Stream stream,
    XlsxExportOptions options = null
)
vb
Public Sub ExportToXlsx(
    stream As Stream,
    options As XlsxExportOptions = Nothing
)

Parameters

NameTypeDescription
streamStream

A Stream descendant class object to which the file should be sent.

|

Optional Parameters

NameTypeDefaultDescription
optionsXlsxExportOptionsnull

Contains settings that apply to the exported document.

|

Remarks

To show the standard Print dialog, use the SankeyDiagramControl.Print method. This dialog allows users to print the diagram, select the printer, specify the range of pages to print, the number of copies, and so on.

To display the DevExpress Print Preview, use one of the following methods:

MethodDescription
SankeyDiagramControl.ShowPrintPreviewCreates a print document and displays the Print Preview dialog.
SankeyDiagramControl.ShowRibbonPrintPreviewCreates a print document and displays the Print Preview with the Ribbon toolbar.

To export the diagram, use one of the ExportTo~ methods (for example, call the SankeyDiagramControl.ExportToPdf method to export the diagram to a PDF file).

Important

The diagram can be previewed, printed or exported to other formats only if the Printing library is available (except when you export to raster and vector images). Ensure you add a reference to the DevExpress.XtraPrinting.v25.2 assembly.

Note that the DevExpress.Pdf.Core library should be available to export a diagram to PDF.

See Also

SankeyDiagramControl Class

SankeyDiagramControl Members

DevExpress.XtraCharts.Sankey Namespace