Example #1
0
 internal NamedRangeCollection(ExcelWorksheet worksheet, NamedRangeCollection sourceNamedRanges)
 {
     this.namesList   = new ArrayList();
     this.namedRanges = new ArrayList();
     this.worksheet   = worksheet;
     for (int i = 0; i < sourceNamedRanges.NamedRanges.Count; i++)
     {
         NamedRange range = sourceNamedRanges.NamedRanges[i] as NamedRange;
         this.Add(range.Options, range.Name, range.Range);
     }
 }
Example #2
0
 public NamedRange this[string name]
 {
     get
     {
         for (int i = 0; i < this.namedRanges.Count; i++)
         {
             NamedRange range = this.namedRanges[i] as NamedRange;
             if (range.Name == name)
             {
                 return(range);
             }
         }
         return(null);
     }
 }