[]
Resizes this ITable to a new range without inserting or moving cells.
The new range must remain on the same header row as the current table and must overlap the current table range. This method does not rearrange worksheet cells; it only updates the table boundary.
void Resize(IRange range)
Sub Resize(range As IRange)
| Type | Name | Description |
|---|---|---|
| IRange | range | The new table range. Must be a single, non-empty IRange that overlaps the current table range. |
worksheet.Range["A1:C4"].Value = new object[,] {
{"Name", "Region", "Sales"},
{"Alice", "East", 100},
{"Bob", "West", 120},
{"Carol", "North", 140}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:C4"], true);
worksheet.Range["D1:D4"].Value = new object[,] {
{"Status"},
{"Open"},
{"Closed"},
{"Open"}
};
table.Resize(worksheet.Range["A1:D4"]);
| Type | Condition |
|---|---|
| ArgumentNullException | if |
| ArgumentException | if the table is bound to a data manager. |