Class ExcelTableCollection
A collection of table objects
Inheritance
System.Object
ExcelTableCollection
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableCollection : IEnumerable<ExcelTable>, IEnumerable
Properties
Count
Number of items in the collection
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
The table Index. Base 0.
Declaration
public ExcelTable this[int Index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
Property Value
Type | Description |
---|---|
ExcelTable |
Item[String]
Indexer
Declaration
public ExcelTable this[string Name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | Name | The name of the table |
Property Value
Type | Description |
---|---|
ExcelTable | The table. Null if the table name is not found in the collection |
Methods
Add(ExcelAddressBase, String)
Create a table on the supplied range
Declaration
public ExcelTable Add(ExcelAddressBase Range, string Name)
Parameters
Type | Name | Description |
---|---|---|
ExcelAddressBase | Range | The range address including header and total row |
System.String | Name | The name of the table. Must be unique |
Returns
Type | Description |
---|---|
ExcelTable | The table object |
Delete(ExcelTable, Boolean)
Delete the table
Declaration
public void Delete(ExcelTable Table, bool ClearRange = false)
Parameters
Type | Name | Description |
---|---|---|
ExcelTable | Table | The table object |
System.Boolean | ClearRange | Clear the table range |
Delete(Int32, Boolean)
Delete the table at the specified index
Declaration
public void Delete(int Index, bool ClearRange = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index | The index |
System.Boolean | ClearRange | Clear the rage if set to true |
Delete(String, Boolean)
Delete the table with the specified name
Declaration
public void Delete(string Name, bool ClearRange = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | Name | The name of the table to be deleted |
System.Boolean | ClearRange | Clear the rage if set to true |
GetEnumerator()
Gets the enumerator for the collection
Declaration
public IEnumerator<ExcelTable> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ExcelTable> | The enumerator |
GetFromRange(ExcelRangeBase)
Get the table object from a range.
Declaration
public ExcelTable GetFromRange(ExcelRangeBase Range)
Parameters
Type | Name | Description |
---|---|---|
ExcelRangeBase | Range | The range |
Returns
Type | Description |
---|---|
ExcelTable | The table. Null if no range matches |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable