Interface IWorkbooks
A collection of all the Workbook objects that are currently open in the Excel application.
Namespace: Syncfusion.XlsIO
Assembly: Syncfusion.XlsIO.Portable.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. |
Open(Stream)
Reads workbook from the stream.
Declaration
IWorkbook Open(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream with workbook's data. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
Open(Stream, ExcelOpenType)
Opens a workbook.
Declaration
IWorkbook Open(Stream stream, ExcelOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream with workbook's data. |
ExcelOpenType | openType | Represents open type for open. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(Stream, ExcelOpenType, ExcelParseOptions)
Opens a workbook.
Declaration
IWorkbook Open(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 |
---|---|
IWorkbook | Opened workbook. |
Open(Stream, ExcelOpenType, ExcelVersion)
Opens a workbook.
Declaration
IWorkbook Open(Stream stream, ExcelOpenType openType, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream with workbook's data. |
ExcelOpenType | openType | Represents open type for open. |
ExcelVersion | version | Desired version of the workbook. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(Stream, ExcelParseOptions)
Reads workbook from the stream.
Declaration
IWorkbook Open(Stream stream, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream with workbook's data. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
Open(Stream, ExcelParseOptions, Boolean, String)
Opens the specified stream.
Declaration
IWorkbook Open(Stream stream, ExcelParseOptions options, bool bReadOnly, string password)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
ExcelParseOptions | options | Parse options. |
System.Boolean | bReadOnly | Indicates is open book in read - only mode. |
System.String | password | Password that should be used for decryption. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
Open(Stream, ExcelParseOptions, Boolean, String, ExcelOpenType)
Opens the specified stream.
Declaration
IWorkbook Open(Stream stream, ExcelParseOptions options, bool isReadOnly, string password, ExcelOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
ExcelParseOptions | options | Parse options. |
System.Boolean | isReadOnly | Indicates is open book in read - only mode. |
System.String | password | Represents valid password for opening workbook. |
ExcelOpenType | openType | Represents type of the file for open operation. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(Stream, ExcelParseOptions, Boolean, String, ExcelVersion)
Opens the specified stream.
Declaration
IWorkbook Open(Stream stream, ExcelParseOptions options, bool isReadOnly, string password, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
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 | version | Workbook version. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Remarks
This method is not supported in WinRT, Windows Phone, Portable, Universal and Silverlight platforms.
Open(Stream, ExcelVersion)
Reads workbook from the stream.
Declaration
IWorkbook Open(Stream stream, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream with workbook's data. |
ExcelVersion | version | Excel version - defines file format (excel 97-2003 or excel 2007). |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
Open(Stream, String)
Opens a Workbook using separator.
Declaration
IWorkbook Open(Stream stream, string separator)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to open. |
System.String | separator | Denotes separator for the CSV file types. |
Returns
Type | Description |
---|---|
IWorkbook | Opened WorkBook. |
Open(Stream, String, Int32, Int32)
Opens a Workbook using separator.
Declaration
IWorkbook Open(Stream stream, string separator, int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to open. |
System.String | separator | Denotes separator for the CSV file types. |
System.Int32 | row | Number of first row to write. |
System.Int32 | column | Number of first column to write. |
Returns
Type | Description |
---|---|
IWorkbook | Opened WorkBook. |
Open(Stream, String, Int32, Int32, Encoding)
Opens a Workbook using separator.
Declaration
IWorkbook Open(Stream stream, string separator, int row, int column, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to open. |
System.String | separator | Denotes separator for the CSV file types. |
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 |
---|---|
IWorkbook | Opened WorkBook. |
Open(Stream, String, Encoding)
Opens a Workbook using separator.
Declaration
IWorkbook Open(Stream stream, string separator, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to open. |
System.String | separator | Denotes separator for the CSV file types. |
System.Text.Encoding | encoding | Encoding to use to parse text data. |
Returns
Type | Description |
---|---|
IWorkbook | Opened WorkBook. |
Open(Stream, Encoding)
Opens a Workbook using default separator.
Declaration
IWorkbook Open(Stream stream, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to open. |
System.Text.Encoding | encoding | Encoding to use to parse text data. |
Returns
Type | Description |
---|---|
IWorkbook | Opened WorkBook. |
OpenFromXml(Stream, ExcelXmlOpenType)
Read workbook from file stream.
Declaration
IWorkbook OpenFromXml(Stream stream, ExcelXmlOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | File stream. |
ExcelXmlOpenType | openType | Xml open type. |
Returns
Type | Description |
---|---|
IWorkbook | Returns opened workbook. |
OpenFromXml(XmlReader, ExcelXmlOpenType)
Read workbook from xml stream.
Declaration
IWorkbook OpenFromXml(XmlReader reader, ExcelXmlOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | Xml reader. |
ExcelXmlOpenType | openType | Xml open type. |
Returns
Type | Description |
---|---|
IWorkbook | Returns opened workbook. |