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; }
/** * Register a new toolpack in this workbook. * * @param toopack the toolpack to register */ public void AddToolPack(UDFFinder toopack) { _udfFinder.Add(toopack); }
/** * * @param name the name of an external function, typically a name of a UDF * @param udf locator of user-defiend functions to resolve names of VBA and Add-In functions * @return the external name or null */ public NameXPtg GetNameXPtg(String name, UDFFinder udf) { LinkTable lnk = OrCreateLinkTable; NameXPtg xptg = lnk.GetNameXPtg(name); if (xptg == null && udf.FindFunction(name) != null) { // the name was not found in the list of external names // check if the Workbook's UDFFinder is aware about it and register the name if it is xptg = lnk.AddNameXPtg(name); } return xptg; }
/** * @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; }
/// <summary> /// Add a new toolpack /// </summary> /// <param name="toolPack"></param> public void Add(UDFFinder toolPack) { _usedToolPacks.Add(toolPack); }
/** * @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); }
public NameXPtg GetNameXPtg(String name, UDFFinder udf) { return GetNameXPtg(name, -1, udf); }
public WorkbookEvaluator(IEvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) : this(workbook, null, stabilityClassifier, udfFinder) { }
/** * Register a new toolpack in this workbook. * * @param toopack the toolpack to register */ public void AddToolPack(UDFFinder toopack) { AggregatingUDFFinder udfs = (AggregatingUDFFinder)_udfFinder; udfs.Add(toopack); }
/** * @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); }