Class ExcelTableCollection¶
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
A collection of table objects
Inheritance¶
Implements¶
IEnumerable
IEnumerable<ExcelTable>
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
Count¶
Number of items in the collection
Property Value¶
this[int]¶
The table Index. Base 0.
Property Value¶
this[string]¶
Indexer
Property Value¶
Methods¶
Add(ExcelAddressBase, string)¶
Create a table on the supplied range
Parameters¶
Range ExcelAddressBase
The range address including header and total row
Name string
The name of the table. Must be unique
Returns¶
The table object
AddQueryTable(ExcelAddressBase, string, ExcelConnection, params string[])¶
Adds a new query table to the collection. To add a new query table you need to specify the queries field names.
public ExcelTable AddQueryTable(ExcelAddressBase Range, string Name, ExcelConnection connection, params string[] fields)
Parameters¶
Range ExcelAddressBase
The range to the table.
Name string
The name of the table
connection ExcelConnection
The connection in the Connections collection.
fields string[]
The names of the fields. EPPlus does not execute the query, so you must set the field names and update the field properties in the Fields collection.
Returns¶
Exceptions¶
If no fields are supplied
If the connection is null or not in the package.
Delete(int, bool)¶
Delete the table at the specified index
Parameters¶
Index int
The index
ClearRange bool
Clear the rage if set to true
Delete(string, bool)¶
Delete the table with the specified name
Parameters¶
Name string
The name of the table to be deleted
ClearRange bool
Clear the rage if set to true
Delete(ExcelTable, bool)¶
Delete the table and removes it from the collection
Parameters¶
Table ExcelTable
The table object
ClearRange bool
Clear the table range
GetEnumerator()¶
Gets the enumerator for the collection
Returns¶
The enumerator
GetFromRange(ExcelRangeBase)¶
Get the table object from a range.
Parameters¶
Range ExcelRangeBase
The range
Returns¶
The table. Null if no range matches