Example #1
0
 public void ParseCellTest()
 {
     Assert.AreEqual(0, Cell.Parse("A").Col);
     Assert.AreEqual(25, Cell.Parse("Z").Col);
     Assert.AreEqual(26, Cell.Parse("AA1").Col);
     Assert.AreEqual(52, Cell.Parse("BA1").Col);
 }
Example #2
0
File: Sheet.cs Project: radtek/xlio
 public CellData this[String location]
 {
     get {
         var cell = Cell.Parse(location);
         return(this[cell]);
     }
 }
Example #3
0
        public static Range Parse(string range)
        {
            int colon = range.IndexOf(':');

            if (colon != -1)
            {
                var c1 = Cell.Parse(range, 0, colon);
                var c2 = Cell.Parse(range, colon + 1, range.Length - colon - 1);
                return(new Range
                {
                    Cell1 = c1, Cell2 = c2
                });
            }
            else
            {
                var c = Cell.Parse(range);
                return(new Range
                {
                    Cell1 = c,
                    Cell2 = c.Clone()
                });
            }
        }
Example #4
0
File: Sheet.cs Project: radtek/xlio
 public SheetRange this[String c1, String c2]
 {
     get { return(new SheetRange(this, new Range {
             Cell1 = Cell.Parse(c1), Cell2 = Cell.Parse(c2)
         })); }
 }
Example #5
0
 public Range(String cell1, String cell2)
 {
     Cell1 = Cell.Parse(cell1);
     Cell2 = Cell.Parse(cell2);
 }