public FormulaParser(ExcelDataProvider excelDataProvider, ParsingContext parsingContext) { parsingContext.Parser = this; parsingContext.ExcelDataProvider = excelDataProvider; parsingContext.NameValueProvider = new EpplusNameValueProvider(excelDataProvider); parsingContext.RangeAddressFactory = new RangeAddressFactory(excelDataProvider); _parsingContext = parsingContext; _excelDataProvider = excelDataProvider; Configure(configuration => { configuration .SetLexer(new Lexer(_parsingContext.Configuration.FunctionRepository, _parsingContext.NameValueProvider)) .SetGraphBuilder(new ExpressionGraphBuilder(excelDataProvider, _parsingContext)) .SetExpresionCompiler(new ExpressionCompiler()) .FunctionRepository.LoadModule(new BuiltInFunctions()); }); }
public FormulaParser(ExcelDataProvider excelDataProvider) : this(excelDataProvider, ParsingContext.Create()) { }
public EpplusNameValueProvider(ExcelDataProvider excelDataProvider) { _excelDataProvider = excelDataProvider; _values = _excelDataProvider.GetWorkbookNameValues(); }