SpreadJS 14
Features / Pivot Table / Refresh Data Source
In This Topic
    Refresh Data Source
    In This Topic

    If the data source for a pivot table is changed at any point of time, the pivot table needs to be refreshed to reflect the latest information. SpreadJS allows you to refresh data source and reflect latest data in the pivot table by using updateSource method of pivot table.

    The following gif shows how to refresh the pivot table with any changes in the data source by using a "Refresh Datasource" button.

    Refresh data source of pivot table

    The following example code shows how to refresh the pivot table with any changes in the data source.

    Javascript
    Copy Code
    function refreshDataSource() {
        myPivotTable.updateSource();
    }