Posted 11 February 2021, 11:48 pm EST
Hi Atif,
Since the SpreadJS is purely based on client-side applications this feature not supported with SPreadJS. What you could do is after the calculation is done you may use add method to add the pivot table on the sheet. Please refer to the following code snippet and let us know if you face any issues.
let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
let sheet1 = spread.getSheet(0);
let sheet2 = spread.getSheet(1);
sheet1.setRowCount(250);
let table = sheet.tables.add('table1', 0, 0, 200, 200);
sheet1.setArray(0, 0, pivotSales);
let pivotTable = sheet2.pivotTables.add("PivotTable", "table1", 0, 0, GC.Spread.Pivot.PivotTableLayoutType.outline, GC.Spread.Pivot.PivotTableThemes.medium2);
PivotTable Demo: https://www.grapecity.com/spreadjs/demos/features/pivot-table/overview/purejs
Regards
Avinash