帆软帮助文档代码合集。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
523 B

package com.fr.function;
import com.fr.base.Utils;
import com.fr.script.AbstractFunction;
public class CellSum extends AbstractFunction {
public Object run(Object[] args) {
String sum = Utils.objectToNumber(new SUM().run(args), false)
.toString(); // 直接调用FR内部的SUM方法
String result = "所在单元格为:" + this.getCalculator().getCurrentColumnRow()
+ ";总和为:" + sum; // 获取当前单元格拼出最终结果
return result;
}
}