public void TestCellsWithoutFormulas() { var wb = new XLWorkbook(); IXLWorksheet ws = wb.AddWorksheet("Test"); IXLRange range = ws.Range(1, 1, 10, 10); range.Cell(1, 1).Value = "Value"; range.Cell(2, 2).Value = "Value2"; range.Cell(2, 2).Active = true; range.Cell(3, 3).FormulaA1 = "=ROW()"; range.Cell(4, 4).FormulaR1C1 = "=COLUMN()"; range.Cell(5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; range.Cell(6, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; range.Cell(6, 6).FormulaA1 = "=A1+B2"; Assert.AreEqual(100, range.Cells().Count()); Assert.AreEqual(97, range.CellsWithoutFormulas().Count()); Assert.AreEqual(3, range.Cells(c => c.Active || c.Style.Border.TopBorder == XLBorderStyleValues.Thin).Count()); Assert.AreEqual(2, range.CellsWithoutFormulas(c => c.Active || c.Style.Border.TopBorder == XLBorderStyleValues.Thin).Count()); }