Commit d4e7f8f0 authored by yanzg's avatar yanzg

修改公式和计算帮助类

parent 3aec3e7f
......@@ -52,7 +52,7 @@ public class FormulaHelper {
// 从名称转换列序号
int formulaColumnIndex = 0;
char[] chs = new char[columnName.length()];
columnName.getChars(0, columnName.length() , chs, 0);
columnName.getChars(0, columnName.length(), chs, 0);
for (int i = 0; i < chs.length; i++) {
formulaColumnIndex = formulaColumnIndex * 26 + (chs[i] - 'a' + 1);
}
......@@ -216,13 +216,13 @@ public class FormulaHelper {
private double calcItem(String flag, double a, double b) {
switch (flag) {
case "+":
return a + b;
return CalcHelper.add(a, b);
case "-":
return a - b;
return CalcHelper.sub(a, b);
case "*":
return a * b;
return CalcHelper.mul(a, b);
case "/":
return a / b;
return CalcHelper.div(a, b);
default:
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment