Пример #1
0
        public DefinedName AddCell(String name, Cell cell, Sheet sheet)
        {
            DefinedName dn = new DefinedName
            {
                Name  = name,
                Value = QuoteSheetName(sheet) + "!" + Cell.Format(cell.Row, cell.Col, true, true)
            };

            definedNames.Add(name, dn);
            return(dn);
        }
Пример #2
0
 public static string Format(Range range, bool absolute = false)
 {
     if (absolute)
     {
         var cell1    = range.Cell1;
         var cell2    = range.Cell2;
         var cell1Str = Cell.Format(cell1.Row, cell1.Col, true, true);
         var cell2Str = Cell.Format(cell2.Row, cell2.Col, true, true);
         return(cell1Str + ":" + cell2Str);
     }
     return(range.ToString());
 }
Пример #3
0
 /// <summary>
 /// Returns cell's string representation, e.g. A1.
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(Cell.Format(Row, Col));
 }
 public void AddCell(Cell cell)
 {
     Ranges.Add(Cell.Format(cell.Row, cell.Col));
 }