public void Cells3() { var wb = new XLWorkbook(); IXLWorksheet ws = wb.AddWorksheet("Sheet1"); ws.FirstCell().SetValue(1).AddToNamed("Result"); IXLCells cells = wb.Cells("Sheet1!Result, ABC"); Assert.IsNotNull(cells); Assert.AreEqual(1, cells.Count()); Assert.AreEqual(1, cells.First().GetValue <Int32>()); }
public void WsNamedCells() { var wb = new XLWorkbook(); IXLWorksheet ws = wb.Worksheets.Add("Sheet1"); ws.Cell(1, 1).SetValue("Test").AddToNamed("TestCell", XLScope.Worksheet); ws.Cell(2, 1).SetValue("B"); IXLCells cells = ws.Cells("TestCell, A2"); Assert.AreEqual("Test", cells.First().GetString()); Assert.AreEqual("B", cells.Last().GetString()); }