public static ValueEval getSingleValue(ValueEval arg, int srcCellRow, int srcCellCol)throws EvaluationException {final ValueEval result;if (arg instanceof RefEval) {result = chooseSingleElementFromRef((RefEval) arg);} else if (arg instanceof AreaEval) {result = chooseSingleElementFromArea((AreaEval) arg, srcCellRow, srcCellCol);} else {result = arg;}if (result instanceof ErrorEval) {throw new EvaluationException((ErrorEval) result);}return result;}
public static ValueEval GetSingleValue(ValueEval arg, int srcCellRow, int srcCellCol){ValueEval result;if (arg is RefEval){result = ChooseSingleElementFromRef((RefEval)arg);}else if (arg is AreaEval){result = ChooseSingleElementFromArea((AreaEval)arg, srcCellRow, srcCellCol);}else{result = arg;}if (result is ErrorEval){throw new EvaluationException((ErrorEval)result);}return result;}