JavaScript
var colArray=['Description','Yearly', 'GrossPay', 'Deduction1', 'Deduction2', 'Audited Pay'];
var data=[
["Total","=SUM(B2:B20000)","=SUM(C2:C20000)","=SUM(D2:D20000)","=SUM(E2:E20000)","=SUM(F2:F20000)"],
["TestRow1","170","=IF(SUM(B2:B2)>0,SUM(B2:B2),\"\")","40","50","=IF(ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C2,0)),0)>0,ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C2,0)),0),\"\")"],
["TestRow2","70","=IF(SUM(B3:B3)>0,SUM(B3:B3),\"\")","20","10","=IF(ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C3,0)),0)>0,ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C3,0)),0),\"\")"],
["TestRow3","740","=IF(SUM(B4:B4)>0,SUM(B4:B4),\"\")","30","40","=IF(ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C4,0)),0)>0,ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C4,0)),0),\"\")"],
["TestRow4","420","=IF(SUM(B5:B5)>0,SUM(B5:B5),\"\")","50","60","=IF(ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C5,0)),0)>0,ROUND(SUM(ROUND((D2*(-50.00/100)),0),ROUND((E2*(-33.33/100)),0),ROUND(C5,0)),0),\"\")"]
];
const hyperformulaInstance = HyperFormula.buildEmpty({
// to use an external HyperFormula instance,
// initialize it with the `'internal-use-in-handsontable'` license key
licenseKey: 'internal-use-in-handsontable',
});
var hot = new Handsontable(example2, {
data:data,
startRows: 8,
startCols: 8,
headerTooltips: {
rows: false,
columns: true,
},
multiColumnSorting: {
sortEmptyCells: false,
indicator: true,
headerAction: true,
compareFunctionFactory: function (sortOrder, columnMeta) {
// implement your own comparator
return function (value, nextValue) {
if (value < nextValue) {
return -1;
}
if...