private bool IsEmpty(Row row) { Cell c; for (int i = 0; i < row.ChildElements.Count(); i++) { // get current cell at i c = row.Elements<Cell>().ElementAt(i); if (c.CellValue != null) { return false; } } return true; }