能否这样:
把函数的参数改成引用单元格的字符串,比如:
=SYSUM("'V2018--项目级--物业项目'!E7")
然后在 evalute 中解析这个字符串以后得到单元格的引用:
SysumFunction.prototype.evaluate = function (context, referenceCellString) {
var rangeExpression = GC.Spread.Sheets.CalcEngine.formulaToExpression(sheet, referenceCellString, 0, 0);
var sheetName = rangeExpression.source.getName();
var row = rangeExpression.row;
var column = rangeExpression.column;
return 10;
}; |