Package org.apache.poi.ss.usermodel

Examples of org.apache.poi.ss.usermodel.CellValue.formatAsString()


    private void confirm(String formulaText, double expectedResult) {
        cell11.setCellFormula(formulaText);
        evaluator.clearAllCachedResultValues();
        CellValue cv = evaluator.evaluate(cell11);
        if (cv.getCellType() != Cell.CELL_TYPE_NUMERIC) {
            throw new AssertionFailedError("Wrong result type: " + cv.formatAsString());
        }
        double actualValue = cv.getNumberValue();
        assertEquals(expectedResult, actualValue, 0);
    }
}
View Full Code Here


    // numeric criteria
        for (int i = 0; i < 8; i++) {
      CellValue expected = evaluator.evaluate(sheet.getRow(i).getCell(REF_COL));
      CellValue actual = evaluator.evaluate(sheet.getRow(i).getCell(EVAL_COL));
      assertEquals(expected.formatAsString(), actual.formatAsString());
    }

        // boolean criteria
        for (int i = 0; i < 8; i++) {
            HSSFCell cellFmla = sheet.getRow(i).getCell(8);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.