SpreadJS Documentation
GC.Spread.Sheets.Tables Namespace / TableManager type / remove Method
The table instance or the table name.
Specifies what data is kept when removing the table.
Remove table, keep nothing.
Remove table, keep table data.
Remove table, keep table style.
In This Topic
    remove Method
    In This Topic
    Removes a specified table.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.TableManager(sheet);
    var value; // Type: any
    value = instance.remove(table, options, options.none, options.keepData, options.keepStyle);
    function remove( 
       table : undefined,
       options : TableRemoveOptions,
       (optional) options.none : number,
       (optional) options.keepData : number,
       (optional) options.keepStyle : number
    ) : any;

    Parameters

    table
    The table instance or the table name.
    options
    Specifies what data is kept when removing the table.
    options.none
    Remove table, keep nothing.
    options.keepData
    Remove table, keep table data.
    options.keepStyle
    Remove table, keep table style.
    Example
    This example removes the table.
    activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
    activeSheet.getCell(0,0).text("Name");
    activeSheet.getCell(0,1).text("Value");
    activeSheet.getCell(0,2).text("T/F");
    activeSheet.getCell(1,0).text("AW");
    activeSheet.getCell(1,1).text("5");
    activeSheet.getCell(1,2).text("T");
    
    $("#button1").click(function () {
    var table  = activeSheet.tables.find(0,0);
    activeSheet.tables.remove(table, GC.Spread.Sheets.Tables.TableRemoveOptions.keepData);
        });
    
    ...
    <input type="button" id="button1" value="Button 1" />
    activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
    activeSheet.getCell(0,0).text("Name");
    activeSheet.getCell(0,1).text("Value");
    activeSheet.getCell(0,2).text("T/F");
    activeSheet.getCell(1,0).text("AW");
    activeSheet.getCell(1,1).text("5");
    activeSheet.getCell(1,2).text("T");
    
    $("#button1").click(function () {
    var table  = activeSheet.tables.find(0,0);
    activeSheet.tables.remove(table);
        });
    See Also