jSpreadsheet plugin pivot Table :





plugins: [
    { name:'pivot', plugin:jexcel_pivotTable, options:{
        rows: ["B"], 
        columns: ["C"], 
        values: "F", 
        valuesFormula: AVGSALARY, 
        filters: {"C": ["New York", "London"]},
        slicers: ["C", "B"],
        orderBy: [1, 2],

        worksheetName: "Pivot Table",
        hideSheetData: false,
        footers: false,
    }},
],

function AVGSALARY(data) {
    var values = [];
    for(var ite_data in data) {
        var value = data[ite_data];
        value = value.replace(/[^0-9\.]/gm, "");
        values.push(Number(value));
    }
    return AVERAGE(values);
}

This plugin is a premium plugin available on Repo of JSpreadsheet plugins

Download full version Documentation

you can try this plugin in limited version in your jspreadsheet in localhost :


<script src="https://demo.gbonnaire.fr/dist/jexcel.pivotTable.js"></script>
<link rel="stylesheet" href="https://demo.gbonnaire.fr/dist/jexcel.pivotTable.css" type="text/css" />