I’m reading one huge excel file (5000 records) using Excel application scope, I want to trim any whitesapces in the data to avoid datatype mismatch error. I searched a lot but couldn’t find any useful resources. Is there any way to trim the entire excel file while reading it??
hey @MLT
if you’re sure that space will be at start you can remove them using .TrimStart if not then just use .Trim for that particular row.
suppose your column name is NAME which has john then in for each row use assign and then
row(“NAME”).ToString = row(“NAME”).ToString.Trim
this should work
if this solved your problem please mark it as solution