the following select returns me the following error when the datatable is empty: The source contains no DataRows.
Since the excel file consists of columns that have the same header, I was forced to read the file with a fixed range βA1:AC100β, this results in that even though the db is empty, it returns me a .Count of 99 rows.
Since I need to perform a check on the existence of data in the table, I thought I would use the following select to clean up the excess rows: dt.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(ββ))).CopyToDataTable()
Dt = dt.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(ββ))).CopyToDataTable()