Package org.apache.poi.ss.formula

Examples of org.apache.poi.ss.formula.WorkbookEvaluator$Counter


    @Deprecated
    public XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier) {
    _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook), stabilityClassifier, null);
  }
  private XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) {
    _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook), stabilityClassifier, udfFinder);
  }
View Full Code Here


  /**
   * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
   */
  private HSSFFormulaEvaluator(HSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) {
    _bookEvaluator = new WorkbookEvaluator(HSSFEvaluationWorkbook.create(workbook), stabilityClassifier, udfFinder);
  }
View Full Code Here

      // formulas are just literal constants "1".."5"
      row.createCell(i).setCellFormula(String.valueOf(i));
    }

    EvalCountListener evalListener = new EvalCountListener();
    WorkbookEvaluator evaluator = WorkbookEvaluatorTestHelper.createEvaluator(wb, evalListener);
    ValueEval ve = evaluator.evaluate(HSSFEvaluationTestHelper.wrapCell(cellA1));
    int evalCount = evalListener.getEvalCount();
    if (evalCount == 6) {
      // Without short-circuit-if evaluation, evaluating cell 'A1' takes 3 extra evaluations (for D1,E1,F1)
      throw new AssertionFailedError("Identifed bug 48195 - Formula evaluator should short-circuit IF() calculations.");
    }
View Full Code Here

    row.createCell(0).setCellValue(cal);

    // Choose cell A9 instead of A10, so that the failing test case doesn't take too long to execute.
    HSSFCell cell = row.getCell(8);
    EvalListener evalListener = new EvalListener();
    WorkbookEvaluator evaluator = WorkbookEvaluatorTestHelper.createEvaluator(wb, evalListener);
    ValueEval ve = evaluator.evaluate(HSSFEvaluationTestHelper.wrapCell(cell));
    int evalCount = evalListener.getCountCacheMisses();
    if (evalCount > 10) {
      // Without caching, evaluating cell 'A9' takes 21845 evaluations which consumes
      // much time (~3 sec on Core 2 Duo 2.2GHz)
      // short-circuit-if optimisation cuts this down to 255 evaluations which is still too high
View Full Code Here

    row.createCell(0).setCellValue(cal);

    // Choose cell A9 instead of A10, so that the failing test case doesn't take too long to execute.
    HSSFCell cell = row.getCell(8);
    EvalListener evalListener = new EvalListener();
    WorkbookEvaluator evaluator = WorkbookEvaluatorTestHelper.createEvaluator(wb, evalListener);
    ValueEval ve = evaluator.evaluate(HSSFEvaluationTestHelper.wrapCell(cell));
    int evalCount = evalListener.getCountCacheMisses();
    if (evalCount > 10) {
      // Without caching, evaluating cell 'A9' takes 21845 evaluations which consumes
      // much time (~3 sec on Core 2 Duo 2.2GHz)
      // short-circuit-if optimisation cuts this down to 255 evaluations which is still too high
View Full Code Here

    if (false) {
      sheet.toString(); // suppress unused parameter compiler warning
    }
  }
  public HSSFFormulaEvaluator(HSSFWorkbook workbook) {
       _bookEvaluator = new WorkbookEvaluator(HSSFEvaluationWorkbook.create(workbook));
  }
View Full Code Here

public class XSSFFormulaEvaluator implements FormulaEvaluator {

  private WorkbookEvaluator _bookEvaluator;

  public XSSFFormulaEvaluator(XSSFWorkbook workbook) {
       _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook));
  }
View Full Code Here

   * @param stabilityClassifier used to optimise caching performance. Pass <code>null</code>
   * for the (conservative) assumption that any cell may have its definition changed after
   * evaluation begins.
   */
  public HSSFFormulaEvaluator(HSSFWorkbook workbook, IStabilityClassifier stabilityClassifier) {
    _bookEvaluator = new WorkbookEvaluator(HSSFEvaluationWorkbook.create(workbook), stabilityClassifier);
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.formula.WorkbookEvaluator$Counter

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.