menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IWorkbooks - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IWorkbooks

    A collection of all the Workbook objects that are currently open in the Excel application.

    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.UWP.dll
    Syntax
    public interface IWorkbooks : IEnumerable<IWorkbook>, IEnumerable

    Properties

    Application

    Used without an object qualifier, this property returns an Application object that represents the Excel application.

    Declaration
    IApplication Application { get; }
    Property Value
    Type
    IApplication

    Count

    Returns the number of objects in the collection. Read-only Long.

    Declaration
    int Count { get; }
    Property Value
    Type
    System.Int32

    Item[Int32]

    Returns a single object from a collection.

    Declaration
    IWorkbook this[int Index] { get; }
    Parameters
    Type Name Description
    System.Int32 Index
    Property Value
    Type
    IWorkbook

    Parent

    Returns the parent object for the specified object.

    Declaration
    object Parent { get; }
    Property Value
    Type
    System.Object

    Methods

    Close()

    Closes the object.

    Declaration
    void Close()

    Create()

    Create empty workbook. The new workbook becomes the active workbook.

    Declaration
    IWorkbook Create()
    Returns
    Type Description
    IWorkbook

    Interface on instance of created workbook.

    Create(Int32)

    Create workbook with specified quantity of empty worksheets.

    Declaration
    IWorkbook Create(int worksheetsQuantity)
    Parameters
    Type Name Description
    System.Int32 worksheetsQuantity

    Quantity of worksheets to create.

    Returns
    Type Description
    IWorkbook

    Interface on instance of created workbook.

    Create(String[])

    Create workbook with specified names. Each worksheet name will be set to corresponding names array element.

    Declaration
    IWorkbook Create(string[] names)
    Parameters
    Type Name Description
    System.String[] names

    Array of names for each worksheet.

    Returns
    Type Description
    IWorkbook

    Interface on instance of created workbook.

    OpenAsync(Stream)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream);

    OpenAsync(Stream, ExcelOpenType)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelOpenType openType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelOpenType openType

    Represents type of the file for open operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelOpenType);

    OpenAsync(Stream, ExcelOpenType, ExcelParseOptions)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelOpenType openType, ExcelParseOptions options)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelOpenType openType

    Represents open type for open.

    ExcelParseOptions options

    Parse options.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelOpenType, ExcelParseOptions);

    OpenAsync(Stream, ExcelParseOptions, Boolean, String)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelParseOptions options, bool isReadOnly, string password)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelParseOptions options

    Parse options.

    System.Boolean isReadOnly

    Indicates is open book in read - only mode.

    System.String password

    Represents valid password for opening workbook.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelParseOptions, bool, string);

    OpenAsync(Stream, ExcelParseOptions, Boolean, String, ExcelVersion)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelParseOptions options, bool isReadOnly, string password, ExcelVersion excelVersion)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelParseOptions options

    Parse options.

    System.Boolean isReadOnly

    Indicates is open book in read - only mode.

    System.String password

    Represents valid password for opening workbook.

    ExcelVersion excelVersion

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelParseOptions, bool, string, ExcelVersion);

    OpenAsync(Stream, ExcelVersion)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelVersion version)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelVersion);

    OpenAsync(Stream, ExcelVersion, ExcelParseOptions)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, ExcelVersion version, ExcelParseOptions options)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelVersion version

    Workbook version.

    ExcelParseOptions options

    Parse options.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelVersion, ExcelParseOptions);

    OpenAsync(Stream, String)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Current seperator.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string);

    OpenAsync(Stream, String, ExcelVersion)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator, ExcelVersion version)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Current seperator.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string, ExcelVersion);

    OpenAsync(Stream, String, Int32, Int32)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator, int row, int column)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write

    System.Int32 column

    Number of first column to write.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string, int, int);

    OpenAsync(Stream, String, Int32, Int32, String, Encoding, ExcelVersion)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator, int row, int column, string fileName, Encoding encoding, ExcelVersion version)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write.

    System.Int32 column

    Number of first column to write.

    System.String fileName

    Name of the file.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string, int, int, string, Encoding, ExcelVersion);

    OpenAsync(Stream, String, Int32, Int32, Encoding)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator, int row, int column, Encoding encoding)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write.

    System.Int32 column

    Number of first column to write.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string, int, int, Encoding);

    OpenAsync(Stream, String, Encoding)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenAsync(Stream stream, string separator, Encoding encoding)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    System.String separator

    Current seperator.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, string, Encoding);

    OpenAsync(StorageFile)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile);

    OpenAsync(StorageFile, ExcelOpenType)

    Opens a workbook.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelOpenType openType)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelOpenType openType

    Represents type of the file for open operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelOpenType);

    OpenAsync(StorageFile, ExcelOpenType, ExcelParseOptions)

    Opens a workbook.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelOpenType openType, ExcelParseOptions options)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelOpenType openType

    Represents type of the file for open operation.

    ExcelParseOptions options

    Parse options.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelOpenType, ExcelParseOptions);

    OpenAsync(StorageFile, ExcelParseOptions, Boolean, String)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelParseOptions options, bool isReadOnly, string password)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelParseOptions options

    Parse options.

    System.Boolean isReadOnly

    Indicates is open book in read - only mode.

    System.String password

    Represents valid password for opening workbook.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelParseOptions, bool, string);

    OpenAsync(StorageFile, ExcelParseOptions, Boolean, String, ExcelVersion)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelParseOptions options, bool isReadOnly, string password, ExcelVersion excelVersion)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelParseOptions options

    Parse options.

    System.Boolean isReadOnly

    Indicates is open book in read - only mode.

    System.String password

    Represents valid password for opening workbook.

    ExcelVersion excelVersion

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelParseOptions, bool, string, ExcelVersion);

    OpenAsync(StorageFile, ExcelVersion)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelVersion version)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelVersion);

    OpenAsync(StorageFile, ExcelVersion, ExcelParseOptions)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, ExcelVersion version, ExcelParseOptions options)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelVersion version

    Workbook version.

    ExcelParseOptions options

    Parse options.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelVersion, ExcelParseOptions);

    OpenAsync(StorageFile, String)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Current separator.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string);

    OpenAsync(StorageFile, String, ExcelVersion)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator, ExcelVersion version)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Current separator.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string, ExcelVersion);

    OpenAsync(StorageFile, String, Int32, Int32)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator, int row, int column)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write.

    System.Int32 column

    Number of first column to write.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string, int, int);

    OpenAsync(StorageFile, String, Int32, Int32, String, Encoding, ExcelVersion)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator, int row, int column, string fileName, Encoding encoding, ExcelVersion version)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write.

    System.Int32 column

    Number of first column to write.

    System.String fileName

    Name of the file.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    ExcelVersion version

    Workbook version.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string, int, int, string, Encoding, ExcelVersion);

    OpenAsync(StorageFile, String, Int32, Int32, Encoding)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator, int row, int column, Encoding encoding)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Separator to use.

    System.Int32 row

    Number of first row to write.

    System.Int32 column

    Number of first column to write.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string, int, int, Ecoding);

    OpenAsync(StorageFile, String, Encoding)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenAsync(StorageFile storageFile, string separator, Encoding encoding)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    System.String separator

    Current separator.

    System.Text.Encoding encoding

    Encoding to use to parse text data.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, string, Encoding);

    OpenFromXmlAsync(Stream, ExcelXmlOpenType)

    Reads workbook from the stream.

    Declaration
    Task<IWorkbook> OpenFromXmlAsync(Stream stream, ExcelXmlOpenType openType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream with workbook's data.

    ExcelXmlOpenType openType

    Represents open type for open.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(Stream, ExcelXmlOpenType);

    OpenFromXmlAsync(XmlReader, ExcelXmlOpenType)

    Read workbook from the reader.

    Declaration
    Task<IWorkbook> OpenFromXmlAsync(XmlReader reader, ExcelXmlOpenType openType)
    Parameters
    Type Name Description
    System.Xml.XmlReader reader
    ExcelXmlOpenType openType

    Represents open type for open.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(XmlReader, ExcelXmlOpenType);

    OpenFromXmlAsync(StorageFile, ExcelXmlOpenType)

    Opens a random-access storage over the file.

    Declaration
    Task<IWorkbook> OpenFromXmlAsync(StorageFile storageFile, ExcelXmlOpenType openType)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile

    Provides information about the file and its content, and ways to manipulate them.

    ExcelXmlOpenType openType

    Represents type of the file for open operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<IWorkbook>

    Opened workbook.

    Examples

    ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Application.Workbooks.OpenAsync(StorageFile, ExcelXmlOpenType);

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved