[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITables.Item

this Property

this[string]

Gets the ITable object with the specified name.

Use this indexer to retrieve an existing table from the collection returned by Tables.

Declaration
ITable this[string name] { get; }
ReadOnly Default Property Item(name As String) As ITable
Parameters
Type Name Description
string name

The ITable name.

Property Value
Type Description
ITable

The ITable object with the specified name.

Examples
IRange range = worksheet.Range["A1:B3"];
range.Value = new object[,] {
    {"Product", "Amount"},
    {"Apple", 10},
    {"Pear", 20}
};
ITable table = worksheet.Tables.Add(range, true);
table.Name = "SalesTable";
ITable namedTable = worksheet.Tables["SalesTable"];

this[int]

Gets the ITable object at the specified index.

Use this indexer to retrieve an existing table from the collection returned by Tables.

Declaration
ITable this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ITable
Parameters
Type Name Description
int index

The index.

Property Value
Type Description
ITable

The ITable object at the specified index.

Examples
IRange range = worksheet.Range["A1:B3"];
range.Value = new object[,] {
    {"Name", "Value"},
    {"Apple", 100},
    {"Pear", 200}
};
worksheet.Tables.Add(range, true);
ITable table = worksheet.Tables[0];