Beispiel #1
0
 internal void AddExternNames(string name, int sheetIndex)
 {
     if (this.SupBooks.Count > 0)
     {
         ExcelSupBook book     = this.SupBooks[this.SupBooks.Count - 1];
         string       fileName = book.FileName;
         if (!string.IsNullOrWhiteSpace(fileName))
         {
             if (sheetIndex >= 0)
             {
                 this.ExternalNamedCellRanges[fileName].Add(new NamedCellRange(name, sheetIndex));
             }
             else
             {
                 this.ExternalNamedCellRanges[fileName].Add(new NamedCellRange(name, -1));
             }
         }
         else if ((book.SheetCount != book.SheetNames.Count) && !book.IsSelfReferenced)
         {
             this.CustomOrFuctionNames.Add(name);
         }
     }
     else
     {
         this.CustomOrFuctionNames.Add(name);
     }
 }
Beispiel #2
0
 internal void AddExternalBook(ExcelSupBook book)
 {
     this.SupBooks.Add(book);
     if (!string.IsNullOrWhiteSpace(book.FileName))
     {
         this.ExternalNamedCellRanges.Add(book.FileName, new List <IName>());
     }
     else
     {
         this.ExternalNames.Add(new List <string>());
     }
 }