Package org.apache.poi.ss.formula.eval

Examples of org.apache.poi.ss.formula.eval.NumericValueEval


    if (eval instanceof BoolEval) {
      BoolEval be = (BoolEval) eval;
      return CellValue.valueOf(be.getBooleanValue());
    }
    if (eval instanceof NumericValueEval) {
      NumericValueEval ne = (NumericValueEval) eval;
      return new CellValue(ne.getNumberValue());
    }
    if (eval instanceof StringValueEval) {
      StringValueEval ne = (StringValueEval) eval;
      return new CellValue(ne.getStringValue());
    }
    if (eval instanceof ErrorEval) {
      return CellValue.getError(((ErrorEval)eval).getErrorCode());
    }
    throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")");
View Full Code Here


      throw new NumericEvalEx("Result object type (" + evalResult.getClass().getName()
          + ") is invalid.  Expected implementor of ("
          + NumericValueEval.class.getName() + ")");
    }

    NumericValueEval result = (NumericValueEval) evalResult;
    return result.getNumberValue();
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.formula.eval.NumericValueEval

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.