Link Search Menu Expand Document

SSpread.DeleteCols Method

Explanation Deletes the specified column or column range.

Deleting a column does not reduce the number of columns set in the MaxCols property, it automatically adds a blank column at the end of the spreadsheet.
Call format DeleteCols(col, numcols)
Return value None
Arguments col First column number in the range of columns to delete
numcols Number of columns to delete
Exception EXT-1 Invalid DeleteCols argument
EXT-28 An error occurred in the DeleteCols method
Example of use
    Function OnRClicked(e) {
        if (e.Row == 0 && e.Col > 0) {
            var ret = PopupMenu("Insert column", "Delete column");
            switch (ret) {
            case 1:
                InsertCols(e.Col, 1);
                break;
            case 2:
                DeleteCols(e.Col, 1);
                break;
            }
        }
    }
    
Related item MaxCols property
DeleteRows, InsertCols methods