Show / Hide Table of Contents

Class ExcelQueryTableCollection

A collection of legacy query tables in a worksheet. Also see AddQueryTable(ExcelAddressBase, string, ExcelConnection, params string[])

Inheritance
object
ExcelQueryTableCollection
Implements
IEnumerable<ExcelQueryTable>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OfficeOpenXml.Data.QueryTable
Assembly: EPPlus.dll
Syntax
public class ExcelQueryTableCollection : IEnumerable<ExcelQueryTable>, IEnumerable

Properties

Count

The number of query tables in the collection

Declaration
public int Count { get; }
Property Value
Type Description
int

this[int]

The query table index.

Declaration
public ExcelQueryTable this[int index] { get; }
Parameters
Type Name Description
int index

The index in the collection.

Property Value
Type Description
ExcelQueryTable

The query table

this[string]

Indexer

Declaration
public ExcelQueryTable this[string name] { get; }
Parameters
Type Name Description
string name

The name of the table

Property Value
Type Description
ExcelQueryTable

The table. Null if the table name is not found in the collection

Methods

Add(ExcelAddressBase, string, ExcelConnection)

Adds a new query table to the collection. Worksheet level query tables are legacy objects and can only be used for older types of connection. For newer types of connections like PowerQuery, use AddQueryTable(ExcelAddressBase, string, ExcelConnection, params string[]) instead.

Declaration
public ExcelQueryTable Add(ExcelAddressBase address, string name, ExcelConnection connection)
Parameters
Type Name Description
ExcelAddressBase address

The address

string name

The name of the query table.

ExcelConnection connection

The connection

Returns
Type Description
ExcelQueryTable
Exceptions
Type Condition
ArgumentException

GetEnumerator()

The enumerator for the collection

Declaration
public IEnumerator<ExcelQueryTable> GetEnumerator()
Returns
Type Description
IEnumerator<ExcelQueryTable>

Remove(ExcelQueryTable)

Removes the query table from the collection.

Declaration
public void Remove(ExcelQueryTable queryTable)
Parameters
Type Name Description
ExcelQueryTable queryTable

RemoveAt(int)

Removes the query table at the given index from the collection.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
int index

Implements

IEnumerable<T>
IEnumerable
In this article
Back to top Generated by DocFX