[]
Gets the ITableColumn object at the specified zero-based index.
Use this indexer to retrieve a column from the ITableColumns collection by its current position in the parent ITable.
ITableColumn this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ITableColumn
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the column in the collection. |
| Type | Description |
|---|---|
| ITableColumn | The ITableColumn object at the specified index. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Name", "Sales"},
{"Apple", 100},
{"Orange", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ITableColumns columns = table.Columns;
ITableColumn salesColumn = columns[1];
Gets the ITableColumn object that corresponds to the specified column name.
ITableColumn this[string name] { get; }
ReadOnly Default Property Item(name As String) As ITableColumn
| Type | Name | Description |
|---|---|---|
| string | name | The column name. |
| Type | Description |
|---|---|
| ITableColumn | The ITableColumn object that corresponds to the specified column name. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ITableColumn column = table.Columns["Amount"];