From 4fec22f6a915dcb9afab4bcb54f23eea9291559f Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 25 Jan 2022 18:47:35 +0000 Subject: [PATCH] [bug-65846] support numbervalue function git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897467 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/ss/formula/functions/NumberValueFunction.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/NumberValueFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/NumberValueFunction.java index 76a2036897..8dd8855ed7 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/NumberValueFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/NumberValueFunction.java @@ -71,7 +71,6 @@ public final class NumberValueFunction implements FreeRefFunction { groupSep = OperandResolver.coerceValueToString(v3).substring(0, 1); //If multiple characters are used in the Decimal_separator or Group_separator arguments, only the first character is used. } } catch (EvaluationException e) { - e.printStackTrace() ; return e.getErrorEval(); } @@ -107,9 +106,8 @@ public final class NumberValueFunction implements FreeRefFunction { result = result / Math.pow(100, countPercent); //If the Text argument ends in one or more percent signs (%), they are used in the calculation of the result. checkValue(result); } catch (EvaluationException e) { - e.printStackTrace() ; return e.getErrorEval(); - } catch (Exception anyex) { + } catch (Exception e) { return ErrorEval.VALUE_INVALID; //If any of the arguments are not valid, NUMBERVALUE returns the #VALUE! error value. } -- 2.39.5