Hi Guys,
i have a small requirement where i have a column with almost 5000 rows in excel
so i have to do some operation , which is check whether there are empty rows, if so eliminate them
next to check for number of digits , so lets say in row 1 i had value as 234 ( I need to make as 8 digits by always adding 0 to left side) -00000234
adding 0 to left side is always default only if number is less than 8 digits
if its 7 digits we have to add one zero to left side
can you help me here
also if the row has any alphabets in it , we hv to skip …no need to perform above task
Hi @micheal1 ,
To Remove empty rows use below syntax DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable()
I have used a For Each Row instead of a Linq to Update the Values. Just Check if it does solve the case. We could later Check if it is really required to be converted to a Linq Update.
Also, It is an Example workflow, The Column Names are not the same as your Input
If the Concern is for the Execution Time (5000 rows), we would like to ask you to Check/Compare the Time Taken using a For Each Row and a Linq Update Query.
Then Choose the Appropriate one as you would want to.