Posted 19 November 2020, 11:08 pm EST
Hi Jeff,
SpreadJS does not support this feature natively… But you may override FormulaTexbox.add method for the required functionality. Please refer to the following code snippet and let us know if you face any issues.
var addFn = GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.add;
GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.add = function (functions) {
var temp = [], spread = GC.Spread.Sheets.findControl("ss"), sheet = spread.getActiveSheet();
var activeRowIndex = sheet.getActiveRowIndex(), activeColIndex = sheet.getActiveColumnIndex();
functions.forEach(function (fn) {
//Sum is disabled for Cell (0,0)
if (fn.name === "SUM" && activeRowIndex === 0 && activeColIndex === 0) {
return;
}
temp.push(fn);
})
addFn.apply(this, [temp]);
}
window.onload = function () {
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 4 });
};
Regards
Avinash