Skip to main content
A newer version of this page is available. .

XlExport.CreateExporter(XlDocumentFormat) Method

Creates an exporter that performs data export to the specified Excel format.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v20.2.Core.dll

NuGet Packages: DevExpress.Printing.Core, DevExpress.WindowsDesktop.Printing.Core

Declaration

public static IXlExporter CreateExporter(
    XlDocumentFormat documentFormat
)

Parameters

Name Type Description
documentFormat XlDocumentFormat

One of the XlDocumentFormat enumeration members that specifies the type of the output document.

Returns

Type Description
IXlExporter

An object exposing the IXlExporter interface.

Example

// Create an exporter instance.
IXlExporter exporter = XlExport.CreateExporter(documentFormat);

// Create a new document and write it to the specified stream.
using (IXlDocument document = exporter.CreateDocument(stream)) {
    // Specify the document culture. 
    document.Options.Culture = CultureInfo.CurrentCulture;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateExporter(XlDocumentFormat) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also