Hi, I want to trim leading spaces for an excel column which contains 5000 records i could not loop through each row which takes more time. Is there any other more efficient way to trim an excel column with thousands of data. Please help
Thanks
Hi, I want to trim leading spaces for an excel column which contains 5000 records i could not loop through each row which takes more time. Is there any other more efficient way to trim an excel column with thousands of data. Please help
Thanks
Do this way
Read the excel field and store in varible Dt1
Then use assign activitiy to use the following
linq query
NewDt = Dt1.AsEnumerable().Where(Function(row) row(ColumnName).ToString.Trim). CopyToDatatable
Write the NewDt to an Excel file using write range
Hope it helps you
Mark it as solution if you got it
Regards
Nived N
Happy Automation
@Muthulakshmi_Thangamuthu
have a look here:
Trim_AllCellsAllRows.xaml (7.6 KB)
it is trimmimg in all rows in all columns
Hi thanks for the reply, I tried but its not working.
Am i doing it right?