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
14 lines
523 B
6 years ago
|
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)
|
||
6 years ago
|
.toString(); // 直接调用FR内部的SUM方法
|
||
6 years ago
|
String result = "所在单元格为:" + this.getCalculator().getCurrentColumnRow()
|
||
6 years ago
|
+ ";总和为:" + sum; // 获取当前单元格拼出最终结果
|
||
6 years ago
|
return result;
|
||
|
}
|
||
|
}
|