Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #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;
        }
Пример #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;
        }
Пример #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);
 }
Пример #6
0
 private XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder);
     _book = workbook;
 }
Пример #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;
        }
Пример #8
0
        public WorkbookEvaluator(EvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
            : this (workbook, null, stabilityClassifier, udfFinder)
        {

        }
Пример #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);
 }
Пример #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)
 {
 }
Пример #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);
 }
Пример #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)
        {

        }
Пример #13
0
 public WorkbookEvaluator(IEvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
     : this(workbook, null, stabilityClassifier, udfFinder)
 {
 }
Пример #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);
 }
Пример #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);
 }
Пример #16
0
 private ForkedEvaluator(IEvaluationWorkbook masterWorkbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
 {
     _sewb = new ForkedEvaluationWorkbook(masterWorkbook);
     _evaluator = new WorkbookEvaluator(_sewb, stabilityClassifier, udfFinder);
 }