SpreadJS 13
GC.Spread.Sheets.Tables Namespace / TableManager type / add Method
The table name.
The row index.
The column index.
The row count of the table.
The column count of the table.
The style of the table.
The initialization options of the table.
Whether to display a header.
Whether to display a footer.
In This Topic
    add Method
    In This Topic
    Adds a range table with a specified size to the sheet.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.TableManager(sheet);
    var value; // Type: Table
    value = instance.add(name,
                         row,
                         column,
                         rowCount,
                         columnCount,
                         style,
                         options,
                         options.showHeader,
                         options.showFooter);
    function add( 
       name : string,
       row : number,
       column : number,
       rowCount : number,
       columnCount : number,
       style : TableTheme,
       options : Object,
       (optional) options.showHeader : boolean,
       (optional) options.showFooter : boolean
    ) : Table;

    Parameters

    name
    The table name.
    row
    The row index.
    column
    The column index.
    rowCount
    The row count of the table.
    columnCount
    The column count of the table.
    style
    The style of the table.
    options
    The initialization options of the table.
    options.showHeader
    Whether to display a header.
    options.showFooter
    Whether to display a footer.

    Return Value

    The new table instance.
    Example
    This example adds a 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");
    See Also