[]
Adds a new row to the table and returns the newly added ITableRow object.
ITableRow Add(int position = -1)
Function Add(Optional position As Integer = -1) As ITableRow
| Type | Name | Description |
|---|---|---|
| int | position | The zero-based position at which to insert the row, or |
| Type | Description |
|---|---|
| ITableRow | The newly added ITableRow object. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ITableRow row = table.Rows.Add();
Adds one or more rows to the table at the specified relative position.
The new rows are inserted at the specified zero-based relative position in the table
data rows. If position is less than 0 or greater than or equal to the
current row count, the new rows are added to the end of the table.
void Add(int position, int count)
Sub Add(position As Integer, count As Integer)
| Type | Name | Description |
|---|---|---|
| int | position | A zero-based relative position that specifies where the new row(s) are added. |
| int | count | The number of rows to add. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
table.Rows.Add(1, 2);