SpreadJS Documentation
GC.Spread.Sheets.Tables Namespace / Table type / showFooter Method
Whether to display a footer.
value decide the way of adding footer, whether insert total row or just override the next line.
In This Topic
    showFooter Method
    In This Topic
    Gets or sets a value that indicates whether to display a footer.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.Table(name,
                                                    row,
                                                    col,
                                                    rowCount,
                                                    colCount,
                                                    style,
                                                    options,
                                                    options.showHeader,
                                                    options.showFooter,
                                                    options.useFooterDropDownList,
                                                    options.showResizeHandle);
    var returnValue; // Type: any
    returnValue = instance.showFooter(value, isFooterInserted);
    function showFooter( 
       value : boolean,
       isFooterInserted : boolean
    ) : any;

    Parameters

    value
    Whether to display a footer.
    isFooterInserted
    value decide the way of adding footer, whether insert total row or just override the next line.

    Return Value

    If no value is set, returns whether to display a footer; otherwise, returns the table.
    Example
    This example creates a table.
    //Add data
    for (var col = 1; col < 6; col++) {
        for (var row = 2; row < 11; row++) {
            activeSheet.setValue(row, col, row + col);
        }
    }
    
    var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
    sTable.showFooter(true);
    //set footer value
    sTable.setColumnValue(0, "Total");
    //set footer formula
    sTable.setColumnFormula(4, "SUM(F3:F11)");
    See Also

    Reference

    Table type