Link Search Menu Expand Document

SSpread.InsertRows Method

Explanation Inserts one or more rows before the specified row.

Inserting a row does not increase the maximum number of rows set in the MaxRows property. The data set in the last row of the spreadsheet will be out of range and lost due to the insertion of a row.
Call format InsertRows(row, numrows)
Return value None
Arguments row Row number immediately before the row insertion position
numrows Number of rows to insert
Exception EXT-1 The argument of InsertRows is invalid
EXT-28 An error occurred in the InsertRows method
Example of use
    Function OnRClicked(e) {
        if (e.Col == 0 && e.Row > 0) {
            var ret = PopupMenu("Add row", "Delete row");
            switch (ret) {
            case 1:
                InsertRows(e.Row, 1);
                break;
            case 2:
                DeleteRows(e.Row, 1);
                break;
            }
        }
    }
    
Related item MaxRows property
DeleteRows, InsertCols methods