Object Reference : Object View and Procedure Reference : Table
  
 
deletecells
Delete cells from a table.
Syntax
table_name.deletecells(cell_range) delete_arg
where delete_arg specifies what to delete or how the surrounding cells should be moved.
The cell_range argument defines the cells to be modified. See Table::setformat for the syntax.
delete_arg may be one of the following:
 
row
Delete row.
column
Delete column.
left
Shift cells to right of cell_range to the left after cells have been deleted.
up
Shift cells below cell_range up after cells have been deleted.
Examples
tab1.deletecells(2:5) row
deletes rows 2 through 5 from the table TAB1.
tab1.deletecells(B2:E5) left
deletes cells B2 through E5 from the table TAB1 and moves all the cells right of and including F2 and F5 to the left in place of B2 and B5 respectively.
tab1.deletecells(B2:E5) up
deletes cells B2 through E5 from the table TAB1 and moves all the cells below and including B5 and F5 up in place of B2 and E5 respectively.
You may delete cells conditionally. For example, to delete the cell e17 if cell b3 is less than c4 and shift the remaining cells in the row to the left:
tab1.deletecells(e17 if [b3]<[c4]) left
Or to delete the range of cells from c7 to d17 if cell b3 is greater than c4 and shift the remaining cells to the left:
tab1.deletecells(c7:d17 if [b3]>[c4]) left
Cross-references
For additional discussion of table commands see “Working with Tables and Spreadsheets”.