IXlDocument Interface

Represents an interface that exposes the specific functionality of a workbook.

Namespace: DevExpress.Export.Xl

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


public interface IXlDocument :

The following members accept/return IXlDocument objects:


An object that exposes the IXlDocument interface is the main spreadsheet document. To create it, call the IXlExporter.CreateDocument method. To add a worksheet to the created workbook, use the IXlDocument.CreateSheet method.


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;
See Also