[]
Gets the ITable object with the specified name.
Use this indexer to retrieve an existing table from the collection returned by Tables.
ITable this[string name] { get; }
ReadOnly Default Property Item(name As String) As ITable
| Type | Name | Description |
|---|---|---|
| string | name | The ITable name. |
| Type | Description |
|---|---|
| ITable | The ITable object with the specified name. |
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"];
Gets the ITable object at the specified index.
Use this indexer to retrieve an existing table from the collection returned by Tables.
ITable this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ITable
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
| Type | Description |
|---|---|
| ITable | The ITable object at the specified index. |
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];