Interface IWorkbooks
A collection of all the Workbook objects that are currently open in the Excel application.
Inherited Members
Namespace: Syncfusion.XlsIO
Assembly: Syncfusion.XlsIO.Base.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 | Description |
---|---|
IApplication |
Count
Returns the number of objects in the collection. Read-only Long.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
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 | Description |
---|---|
IWorkbook |
Parent
Returns the parent object for the specified object.
Declaration
object Parent { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
Add()
Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.
Declaration
IWorkbook Add()
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
Add(ExcelVersion)
Creates a new workbook. The new workbook becomes the active workbook.
Declaration
IWorkbook Add(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | Excel version - defines file format (excel 97-2003 or excel 2007). |
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
Add(String)
Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.
Declaration
IWorkbook Add(string strTemplateFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | strTemplateFile | File that contains required workbook. |
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
Add(String, ExcelParseOptions)
Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.
Declaration
IWorkbook Add(string strTemplateFile, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | strTemplateFile | File that contains required workbook. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
Add(String, ExcelParseOptions, ExcelVersion)
Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.
Declaration
IWorkbook Add(string strTemplateFile, ExcelParseOptions options, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.String | strTemplateFile | File that contains required workbook. |
ExcelParseOptions | options | Parse options. |
ExcelVersion | version | Excel version - defines file format (excel 97-2003 or excel 2007). |
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
Add(String, ExcelVersion)
Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.
Declaration
IWorkbook Add(string strTemplateFile, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.String | strTemplateFile | File that contains required workbook. |
ExcelVersion | version | Excel version - defines file format (excel 97-2003 or excel 2007). |
Returns
Type | Description |
---|---|
IWorkbook | Added Workbook object. |
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. |
Open(String)
Opens a workbook.
Declaration
IWorkbook Open(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | File name that contains workbook. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, ExcelOpenType)
Opens a workbook.
Declaration
IWorkbook Open(string fileName, ExcelOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name that contains workbook. |
ExcelOpenType | openType | Represents open type for open. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, ExcelOpenType, ExcelParseOptions)
Opens a workbook.
Declaration
IWorkbook Open(string fileName, ExcelOpenType openType, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name that contains workbook. |
ExcelOpenType | openType | Represents open type for open. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, ExcelOpenType, ExcelVersion)
Opens a workbook.
Declaration
IWorkbook Open(string fileName, ExcelOpenType openType, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name that contains workbook. |
ExcelOpenType | openType | Represents open type for open. |
ExcelVersion | version | Desired version of the workbook. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, ExcelParseOptions)
Opens a workbook.
Declaration
IWorkbook Open(string Filename, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | Filename | File name that contains workbook. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, ExcelParseOptions, Boolean, String)
Open new workbook in read-only mode.
Declaration
IWorkbook Open(string strFileName, ExcelParseOptions options, bool bReadOnly, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileName | File to open. |
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(String, ExcelParseOptions, Boolean, String, ExcelOpenType)
Opens a workbook.
Declaration
IWorkbook Open(string fileName, ExcelParseOptions options, bool isReadOnly, string password, ExcelOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name that contains workbook. |
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(String, ExcelParseOptions, Boolean, String, ExcelVersion)
Opens a workbook.
Declaration
IWorkbook Open(string fileName, ExcelParseOptions options, bool isReadOnly, string password, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name that contains workbook. |
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. |
Open(String, ExcelVersion)
Opens a workbook.
Declaration
IWorkbook Open(string filename, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | File name that contains workbook. |
ExcelVersion | version | Excel version - defines file format (excel 97-2003 or excel 2007). |
Returns
Type | Description |
---|---|
IWorkbook | Opened workbook. |
Open(String, String)
Opens a Workbook using separator.
Declaration
IWorkbook Open(string fileName, string separator)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Stream to open. |
System.String | separator | Denotes separator for the CSV file types. |
Returns
Type | Description |
---|---|
IWorkbook | Opened WorkBook. |
Open(String, String, Int32, Int32)
Opens a Workbook using separator.
Declaration
IWorkbook Open(string fileName, string separator, int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name 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(String, String, Int32, Int32, Encoding)
Opens a Workbook using separator.
Declaration
IWorkbook Open(string fileName, string separator, int row, int column, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name 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(String, String, Encoding)
Opens a Workbook using separator.
Declaration
IWorkbook Open(string fileName, string separator, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | 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(String, Encoding)
Opens a Workbook using default separator.
Declaration
IWorkbook Open(string fileName, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | 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(String, ExcelXmlOpenType)
Read workbook from xml file.
Declaration
IWorkbook OpenFromXml(string strPath, ExcelXmlOpenType openType)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPath | Full path to xml file. |
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. |
OpenReadOnly(String)
Open new workbook in read-only mode.
Declaration
IWorkbook OpenReadOnly(string strFileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileName | File to open. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
OpenReadOnly(String, ExcelOpenType, ExcelParseOptions)
Open new workbook in read-only mode.
Declaration
IWorkbook OpenReadOnly(string strFileName, ExcelOpenType openType, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileName | File to open. |
ExcelOpenType | openType | Represents open type for open. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
OpenReadOnly(String, ExcelParseOptions)
Open new workbook in read-only mode.
Declaration
IWorkbook OpenReadOnly(string strFileName, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileName | File to open. |
ExcelParseOptions | options | Parse options. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
OpenReadOnly(String, String)
Open new CSV file in read-only mode.
Declaration
IWorkbook OpenReadOnly(string strFileName, string seperator)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileName | File to open. |
System.String | seperator | String separator. |
Returns
Type | Description |
---|---|
IWorkbook | Newly created workbook. |
PasteWorkbook()
Pastes workbook from clipboard.
Declaration
IWorkbook PasteWorkbook()
Returns
Type | Description |
---|---|
IWorkbook | Returns a parent |