// 计算字符串公式的值比如 1*50 计算结果为 50 function GetEval() { this.name = 'geteval'; this.maxArgs = 1; this.minArgs = 1; } GetEval.prototype = new GC.Spread.CalcEngine.Functions.Function(); GetEval.prototype.evaluate = function(args) { debugger ;//调试用的 try { var param = eval(arguments[0] == null ? "0" : arguments[0].replace("=", "")); } catch (error) { var param = 0; } return param; } GC.Spread.CalcEngine.Functions.defineGlobalCustomFunction("geteval", new GetEval());