Esempio n. 1
0
        internal RangeTemplate(string name, IXLRange range, TempSheetBuffer buff, TemplateErrors errors, IDictionary <string, object> globalVariables)
        {
            _rowRange      = range;
            _cells         = new TemplateCells(this);
            _tagsEvaluator = new TagsEvaluator();
            var wb = _rowRange.Worksheet.Workbook;

            _buff            = buff;
            _errors          = errors;
            _globalVariables = globalVariables;
            _tags            = new TagsList(_errors);
            _rangeTags       = new TagsList(_errors);
            Name             = name;
            Source           = name;
            var rangeName = name + "_tpl";

            if (wb.NamedRanges.TryGetValue(rangeName, out var namedRange))
            {
                namedRange.Add(range);
            }
            else
            {
                wb.NamedRanges.Add(rangeName, range);
            }

            _evaluator = new FormulaEvaluator();
        }
Esempio n. 2
0
        internal RangeTemplate(IXLNamedRange range, TempSheetBuffer buff)
        {
            _rowRange      = range.Ranges.First();
            _cells         = new TemplateCells(this);
            _tagsEvaluator = new TagsEvaluator();
            var wb = _rowRange.Worksheet.Workbook;

            _buff      = buff;
            _tags      = new TagsList();
            _rangeTags = new TagsList();
            Name       = range.Name;
            Source     = range.Name;
            wb.NamedRanges.Add(range.Name + "_tpl", range.Ranges);
        }
Esempio n. 3
0
        internal RangeTemplate(IXLNamedRange range, TempSheetBuffer buff, TemplateErrors errors, IDictionary <string, object> globalVariables)
        {
            _rowRange      = range.Ranges.First();
            _cells         = new TemplateCells(this);
            _tagsEvaluator = new TagsEvaluator();
            var wb = _rowRange.Worksheet.Workbook;

            _buff            = buff;
            _errors          = errors;
            _globalVariables = globalVariables;
            _tags            = new TagsList(_errors);
            _rangeTags       = new TagsList(_errors);
            Name             = range.Name;
            Source           = range.Name;
            wb.NamedRanges.Add(range.Name + "_tpl", range.Ranges);
        }