public void TestAddNameX() { HSSFWorkbook hwb = new HSSFWorkbook(); InternalWorkbook wb = TestHSSFWorkbook.GetInternalWorkbook(hwb); Assert.IsNotNull(wb.GetNameXPtg("ISODD", UDFFinder.GetDefault())); FreeRefFunction1 NotImplemented = new FreeRefFunction1(); /** * register the two test UDFs in a UDF Finder, to be passed to the Evaluator */ UDFFinder udff1 = new DefaultUDFFinder(new String[] { "myFunc", }, new FreeRefFunction[] { NotImplemented }); UDFFinder udff2 = new DefaultUDFFinder(new String[] { "myFunc2", }, new FreeRefFunction[] { NotImplemented }); UDFFinder udff = new AggregatingUDFFinder(udff1, udff2); Assert.IsNotNull(wb.GetNameXPtg("myFunc", udff)); Assert.IsNotNull(wb.GetNameXPtg("myFunc2", udff)); Assert.IsNull(wb.GetNameXPtg("myFunc3", udff)); // myFunc3 is unknown hwb.Close(); }
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(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; }
public WorkbookEvaluator(IEvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) : this(workbook, null, stabilityClassifier, udfFinder) { }
/** * @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)); }
private ForkedEvaluator(IEvaluationWorkbook masterWorkbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) { _sewb = new ForkedEvaluationWorkbook(masterWorkbook); _evaluator = new WorkbookEvaluator(_sewb, stabilityClassifier, udfFinder); }
public void AddToolPack(UDFFinder toopack) { XssfWorkbook.AddToolPack(toopack); }
/** * @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)); }
private XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) { _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder); _book = workbook; }
/** * @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); }
private SXSSFFormulaEvaluator(SXSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) : this(workbook, new WorkbookEvaluator(SXSSFEvaluationWorkbook.Create(workbook), stabilityClassifier, udfFinder)) { }
/** * @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); }
public void AddToolPack(UDFFinder toopack) { this._udfFinder.Add(toopack); }