[]
Deletes one or more rows from the table.
The position value is zero-based and specifies the relative position
within the table data rows. Remaining cells below the deleted rows are shifted up.
If count exceeds the number of rows available from the specified position,
only the remaining rows are deleted.
void Delete(int position, int count)
Sub Delete(position As Integer, count As Integer)
| Type | Name | Description |
|---|---|---|
| int | position | A zero-based relative position that specifies where the row deletion starts. |
| int | count | The number of rows to delete. |
worksheet.Range["A1:B4"].Value = new object[,] {
{"Name", "Value"},
{"A", 100},
{"B", 200},
{"C", 300}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B4"], true);
table.Rows.Delete(1, 2);