IXlExporter Interface
Represents an exporter used to create a spreadsheet document and export it to a stream.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v18.1.Core.dll
Declaration
Related API Members
The following members accept/return IXlExporter objects:
Remarks
To create an object that exposes the IXlExporter interface, use the XlExport.CreateExporter method.
To generate a new spreadsheet document and write it to a stream, call the IXlExporter.CreateDocument method.
Example
The example below demonstrates how to create a new document and write it to the specified file stream using the IXlExporter.CreateDocument method.
// Create an exporter instance.
IXlExporter exporter = XlExport.CreateExporter(XlDocumentFormat.Xlsx);
// Create the FileStream object with the specified file path.
using (FileStream stream = new FileStream("Document.xlsx", FileMode.Create, FileAccess.ReadWrite))
{
// 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;
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the IXlExporter interface.
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.