table insert rows, table insert rows if needed
This function inserts a specified number of blank rows in a specified location.
The suffix ... if needed will suppress an exception if the rows to be inserted lie below the last table row.
In this case, no actions will happen. Not even blank rows are added below.
Indirect parameter passing is disabled
2 - 3
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2 input |
numeral | Row number Table rows begin with row 0 (header row). Negative indexing is supported, i.e. -1 = last table row. |
3 input |
numeral | Number of rows to isert Number of blank rows to insert. |
Table not found
table initialize ( table 1,
{ { Animal, leg count }, { Worm, 0}, { Bird, 2 }, { Dog, 4 }, { Fly, 6 }, { Tick, 8 } } );
table insert rows( table 1, 1, 2 ); // Insert 2 rws above row 1 (below header row)
table insert rows( table 1, -1, 1 ); // Insert 1 row before last row
table list( table 1 );
0 : Animal | leg count
1 : |
2 : |
3 : Worm | 0
4 : Bird | 2
5 : Dog | 4
6 : Fly | 6
7 : |
8 : Tick | 8