예제 #1
0
        public virtual object ParseAt(string worksheetName, int row, int col)
        {
            var f = _excelDataProvider.GetRangeFormula(worksheetName, row, col);

            if (string.IsNullOrEmpty(f))
            {
                return(_excelDataProvider.GetRangeValue(worksheetName, row, col));
            }
            else
            {
                return(Parse(f, _parsingContext.RangeAddressFactory.Create(worksheetName, col, row)));
            }
        }
예제 #2
0
        public virtual object ParseAt(string worksheetName, int row, int col)
        {
            var f = _excelDataProvider.GetRangeFormula(worksheetName, row, col);

            if (string.IsNullOrEmpty(f))
            {
                return(_excelDataProvider.GetRangeValue(worksheetName, row, col));
            }
            else
            {
                return(Parse(f, _parsingContext.RangeAddressFactory.Create(worksheetName, col, row)));
            }
            //var dataItem = _excelDataProvider.GetRangeValues(address).FirstOrDefault();
            //if (dataItem == null /*|| (dataItem.Value == null && dataItem.Formula == null)*/) return null;
            //if (!string.IsNullOrEmpty(dataItem.Formula))
            //{
            //    return Parse(dataItem.Formula, _parsingContext.RangeAddressFactory.Create(address));
            //}
            //return Parse(dataItem.Value.ToString(), _parsingContext.RangeAddressFactory.Create(address));
        }