应该可以黏贴的呀,你先定义好这个函数,再设置公式试试,比如:
var MyF = function () { };
MyF.prototype = new GC.Spread.CalcEngine.Functions.Function("XMGS", 3, 3);
MyF.prototype.evaluate = function (arg1, arg2, arg3) {
return arg1 + arg2 + arg3;
}
GC.Spread.CalcEngine.Functions.defineGlobalCustomFunction("XMGS", new MyF());
sheet.setFormula(3,3, 'XMGS("A", "B", "C")'); |