public WorkbookEvaluator(EvaluationWorkbook workbook, IEvaluationListener evaluationListener, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _workbook           = workbook;
     _evaluationListener = evaluationListener;
     _cache = new EvaluationCache(evaluationListener);
     _sheetIndexesBySheet = new Hashtable();
     _sheetIndexesByName  = new Dictionary <string, int>();
     _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
     _workbookIx          = 0;
     _stabilityClassifier = stabilityClassifier;
     _udfFinder           = udfFinder == null ? UDFFinder.DEFAULT : udfFinder;
 }
 public WorkbookEvaluator(EvaluationWorkbook workbook, IEvaluationListener evaluationListener, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _workbook = workbook;
     _evaluationListener = evaluationListener;
     _cache = new EvaluationCache(evaluationListener);
     _sheetIndexesBySheet = new Hashtable();
     _sheetIndexesByName = new Dictionary<string,int>();
     _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
     _workbookIx = 0;
     _stabilityClassifier = stabilityClassifier;
     _udfFinder = udfFinder == null ? UDFFinder.DEFAULT : udfFinder;
 }
Example #3
0
        public WorkbookEvaluator(IEvaluationWorkbook workbook, IEvaluationListener evaluationListener, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
        {
            _workbook = workbook;
            _evaluationListener = evaluationListener;
            _cache = new EvaluationCache(evaluationListener);
            _sheetIndexesBySheet = new Hashtable();
            _sheetIndexesByName = new Dictionary<string, int>();
            _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
            _workbookIx = 0;
            _stabilityClassifier = stabilityClassifier;

            AggregatingUDFFinder defaultToolkit = // workbook can be null in unit tests
                workbook == null ? null : (AggregatingUDFFinder)workbook.GetUDFFinder();
            if (defaultToolkit != null && udfFinder != null)
            {
                defaultToolkit.Add(udfFinder);
            }
            _udfFinder = defaultToolkit;
        }
Example #4
0
        public WorkbookEvaluator(IEvaluationWorkbook workbook, IEvaluationListener evaluationListener, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
        {
            _workbook           = workbook;
            _evaluationListener = evaluationListener;
            _cache = new EvaluationCache(evaluationListener);
            _sheetIndexesBySheet = new Hashtable();
            _sheetIndexesByName  = new Dictionary <string, int>();
            _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
            _workbookIx          = 0;
            _stabilityClassifier = stabilityClassifier;

            AggregatingUDFFinder defaultToolkit = // workbook can be null in unit tests
                                                  workbook == null ? null : (AggregatingUDFFinder)workbook.GetUDFFinder();

            if (defaultToolkit != null && udfFinder != null)
            {
                defaultToolkit.Add(udfFinder);
            }
            _udfFinder = defaultToolkit;
        }
Example #5
0
 /**
  * @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.
  * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
  */
 public static XSSFFormulaEvaluator Create(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     return new XSSFFormulaEvaluator(workbook, stabilityClassifier, udfFinder);
 }
Example #6
0
 private XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder);
     _book = workbook;
 }
Example #7
0
        /**
         * @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.
         * @deprecated (Sep 2009) (reduce overloading) use {@link #Create(XSSFWorkbook, NPOI.ss.formula.IStabilityClassifier, NPOI.ss.formula.udf.UDFFinder)}
         */

        public XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier)
        {
            _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, null);
            _book = workbook;
        }
        public WorkbookEvaluator(EvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
            : this (workbook, null, stabilityClassifier, udfFinder)
        {

        }
Example #9
0
 /**
  * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
  */
 private HSSFFormulaEvaluator(NPOI.SS.UserModel.Workbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _bookEvaluator = new WorkbookEvaluator(HSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder);
 }
Example #10
0
 /**
  * @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(NPOI.SS.UserModel.Workbook workbook, IStabilityClassifier stabilityClassifier)
     : this(workbook, stabilityClassifier, null)
 {
 }
Example #11
0
 /**
  * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
  */
 public HSSFFormulaEvaluator(IWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _bookEvaluator = new WorkbookEvaluator(HSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder);
 }
Example #12
0
        /**
         * @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(IWorkbook workbook, IStabilityClassifier stabilityClassifier)
            : this(workbook, stabilityClassifier, null)
        {

        }
Example #13
0
 public WorkbookEvaluator(IEvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
     : this(workbook, null, stabilityClassifier, udfFinder)
 {
 }
Example #14
0
 /**
  * @param udfFinder pass <code>null</code> for default (AnalysisToolPak only)
  */
 public static ForkedEvaluator Create(IWorkbook wb, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     return new ForkedEvaluator(CreateEvaluationWorkbook(wb), stabilityClassifier, udfFinder);
 }
Example #15
0
 /**
  * @deprecated (Sep 2009) (reduce overloading) use {@link #Create(Workbook, IStabilityClassifier, UDFFinder)}
  */
 public static ForkedEvaluator Create(IWorkbook wb, IStabilityClassifier stabilityClassifier)
 {
     return Create(wb, stabilityClassifier, null);
 }
Example #16
0
 private ForkedEvaluator(IEvaluationWorkbook masterWorkbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _sewb = new ForkedEvaluationWorkbook(masterWorkbook);
     _evaluator = new WorkbookEvaluator(_sewb, stabilityClassifier, udfFinder);
 }