Пример #1
0
 protected override IToken ResolveRange(RangeToken r)
 {
     if(_dependencies != null) {
     _dependencies.Add(r);
     return new NullToken();
       }
       return _baseCell.Worksheet[r.Value];
 }
Пример #2
0
 protected abstract IToken ResolveRange(RangeToken r);
Пример #3
0
 ResolveRange(RangeToken r);
Пример #4
0
 protected override IToken ResolveRange(RangeToken r)
 {
     string key = _spreadSheet.ConvertAddress(_baseCell.Address, r.Value);
       if(_cells.ContainsKey(key)) {
     return new VariableToken(_cells[key].Variable);
       }
       object range = _spreadSheet.GetCellValue(_baseCell.Address, key);
       if(range.GetType().IsArray) {
     throw new ArgumentException();
       }
       if(range.GetType() == typeof(bool)) {
     return new BooleanToken((bool) range);
       } else if(range.GetType() == typeof(string)) {
     return new StringToken((string) range);
       } else if(range.GetType() == typeof(double)) {
     return new NumberToken((double) range);
       } else {
     throw new ArgumentException();
       }
 }