Class ExternBookCollection
Collection of external workbooks in the worksheet.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class ExternBookCollection : CollectionBaseEx<ExternWorkbookImpl>, IList<ExternWorkbookImpl>, ICollection<ExternWorkbookImpl>, IEnumerable<ExternWorkbookImpl>, IEnumerable, IParentApplication, ICloneParent
Constructors
ExternBookCollection(IApplication, object)
Creates collection with specified Application and Parent.
Declaration
public ExternBookCollection(IApplication application, object parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IApplication | application | Application object for the collection. |
| object | parent | Parent object for the collection. |
Properties
this[int]
Returns single extern workbook from the collection.
Declaration
public ExternWorkbookImpl this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type |
|---|
| ExternWorkbookImpl |
this[string]
Returns single extern workbook from the collection.
Declaration
public ExternWorkbookImpl this[string strUrl] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | strUrl |
Property Value
| Type |
|---|
| ExternWorkbookImpl |
ParentWorkbook
Returns parent workbook. Read-only.
Declaration
public WorkbookImpl ParentWorkbook { get; }
Property Value
| Type |
|---|
| WorkbookImpl |
Methods
Add(ExternWorkbookImpl)
Adds workbook into collection.
Declaration
public int Add(ExternWorkbookImpl book)
Parameters
| Type | Name | Description |
|---|---|---|
| ExternWorkbookImpl | book | Book to add. |
Returns
| Type | Description |
|---|---|
| int | Index of the new workbook. |
Add(string)
Adds new workbook into collection
Declaration
public int Add(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName | Workbook to add. |
Returns
| Type | Description |
|---|---|
| int | Index of the new workbook. |
Add(string, bool)
Adds new workbook into collection
Declaration
public int Add(string fileName, bool bAddInFunctions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName | Workbook to add. |
| bool | bAddInFunctions |
Returns
| Type | Description |
|---|---|
| int | Index of the new workbook. |
Add(string, string, List<string>, string[])
Declaration
public int Add(string filePath, string fileName, List<string> sheets, string[] names)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | |
| string | fileName | |
| List<string> | sheets | |
| string[] | names |
Returns
| Type |
|---|
| int |
AddCopy(ExternBookCollection)
Copies subbook collection.
Declaration
public Dictionary<int, int> AddCopy(ExternBookCollection subBooks)
Parameters
| Type | Name | Description |
|---|---|---|
| ExternBookCollection | subBooks | Represents parent subbook collection. |
Returns
| Type | Description |
|---|---|
| Dictionary<int, int> | Returns sub book indexes hash. Key - old indexes; Value - new indexes. |
AddDDEFile(string)
Adds new workbook into collection
Declaration
public int AddDDEFile(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName | Workbook to add. |
Returns
| Type | Description |
|---|---|
| int | Index of the new workbook. |
ContainsExternName(string)
Checks whether any of books in this collection contains extern name.
Declaration
public bool ContainsExternName(string strName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strName | Name to search. |
Returns
| Type | Description |
|---|---|
| bool | True if name was found; false otherwise. |
ContainsExternName(string, ref int, ref int)
Checks whether any of books in this collection contains extern name.
Declaration
public bool ContainsExternName(string strName, ref int iBookIndex, ref int iNameIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strName | Name to search. |
| int | iBookIndex | Output extern workbook index. |
| int | iNameIndex | Output name index. |
Returns
| Type | Description |
|---|---|
| bool | True if name was found; false otherwise. |
GetBookByShortName(string)
Returns extern workbook with specified short name.
Declaration
public ExternWorkbookImpl GetBookByShortName(string strShortName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strShortName | Short name to find. |
Returns
| Type | Description |
|---|---|
| ExternWorkbookImpl | Extern workbook that corresponds to the specified short name; or Null if there isn't such workbook. |
GetNameIndexes(string, out int)
Returns index of the extern name.
Declaration
public int GetNameIndexes(string strName, out int iRefIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strName | Name to search. |
| int | iRefIndex | Reference index. |
Returns
| Type | Description |
|---|---|
| int | Returns index to extern workbook containing required name. |
InsertSelfSupbook()
Inserts SupbookRecord describing this workbook.
Declaration
public int InsertSelfSupbook()
Returns
| Type | Description |
|---|---|
| int | Index to the SupBookRecord that describes current workbook. |
OnInsertComplete(int, ExternWorkbookImpl)
Declaration
protected override void OnInsertComplete(int index, ExternWorkbookImpl value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | |
| ExternWorkbookImpl | value |
Overrides
Parse(BiffReader, IDecryptor)
Extracts extern workbooks from the BiffReader.
Declaration
[CLSCompliant(false)]
public void Parse(BiffReader reader, IDecryptor decryptor)
Parameters
| Type | Name | Description |
|---|---|---|
| BiffReader | reader | Reader to extract records from. |
| IDecryptor | decryptor | Object used to decrypt encrypted records. |
Parse(BiffRecordRaw[], int)
Parses array of biff records.
Declaration
[CLSCompliant(false)]
public int Parse(BiffRecordRaw[] arrData, int iOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| BiffRecordRaw[] | arrData | Array to parse. |
| int | iOffset | Offset to collection data. |
Returns
| Type | Description |
|---|---|
| int | Offset value after parsing all workbooks. |
Serialize(OffsetArrayList)
Serializes collection of external workbooks as biff records.
Declaration
[CLSCompliant(false)]
public void Serialize(OffsetArrayList records)
Parameters
| Type | Name | Description |
|---|---|---|
| OffsetArrayList | records | OffsetArrayList to serialize into. |