Back to Devexpress

HierarchicalChartControlBase.ExportToDocx(Stream, DocxExportOptions) Method

windowsforms-devexpress-dot-xtratreemap-dot-hierarchicalchartcontrolbase-dot-exporttodocx-x28-system-dot-io-dot-stream-devexpress-dot-xtraprinting-dot-docxexportoptions-x29.md

latest4.2 KB
Original Source

HierarchicalChartControlBase.ExportToDocx(Stream, DocxExportOptions) Method

Exports the control in the Office Open XML file format (DOCX file) and sends it to the specified stream.

Namespace : DevExpress.XtraTreeMap

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

NuGet Package : DevExpress.Win.TreeMap

Declaration

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

Parameters

NameTypeDescription
streamStream

A Stream object to which the created document is exported.

|

Optional Parameters

NameTypeDefaultDescription
optionsDocxExportOptionsnull

A DocxExportOptions object that contains the options for the resulting DOCX file.

|

Remarks

To print the document immediately using the default printer without invoking any dialogs, use the HierarchicalChartControlBase.Print method.

To show the standard Print dialog, use the HierarchicalChartControlBase.ShowPrintDialog method. The dialog allows end-users to print the chart, select the printer (if required), specify the range of pages to print, the number of copies, etc.

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

MethodDescription
HierarchicalChartControlBase.ShowPrintPreviewCreates the print document and displays the Print Preview of the document.
HierarchicalChartControlBase.ShowRibbonPrintPreviewCreates the print document and displays the Print Preview with the Ribbon toolbar of the document.

To export the treemap or sunburst, use the appropriate ExportTo method (e.g., HierarchicalChartControlBase.ExportToPdf, HierarchicalChartControlBase.ExportToImage, HierarchicalChartControlBase.ExportToXls, HierarchicalChartControlBase.ExportToXlsx, HierarchicalChartControlBase.ExportToRtf, HierarchicalChartControlBase.ExportToMht.)

Important

The chart can be previewed, printed and exported only if the Printing-Exporting Library is available. Make sure you add a reference to the DevExpress.XtraPrinting.v25.2 assembly.

See Also

HierarchicalChartControlBase Class

HierarchicalChartControlBase Members

DevExpress.XtraTreeMap Namespace