[]
Deletes one or more columns from the table.
The position parameter is zero-based and is relative to the table.
If count exceeds the number of columns available from position,
only the remaining columns are deleted.
void Delete(int position, int count)
Sub Delete(position As Integer, count As Integer)
| Type | Name | Description |
|---|---|---|
| int | position | The zero-based relative position of the first column to delete. |
| int | count | The number of columns to delete. |
worksheet.Range["A1:C3"].Value = new object[,] {
{"Name", "Q1", "Q2"},
{"Alice", 100, 120},
{"Bob", 90, 110}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:C3"], true);
table.Columns.Delete(1, 1);