protected bool IsRowEmpty(ExcelDataReader reader, decimal count, IEnumerable <int> excludedColumns) { var itemArray = new object[reader.FieldCount]; reader.GetValues(itemArray); var emptyRowFound = itemArray.Where((r, d) => excludedColumns.Contains(d)).All(v => v == DBNull.Value); if (emptyRowFound) { } return(emptyRowFound); }