Follow the steps…
Read the data into datatable…
- Use for loop onthe datatable(currentrow)
- Inside the loop …use another loop(item) for columns on Enumerable.Range(0,dt.Columns.count).ToArray and change type argument to int32
- Inside the second loop use assign
Currentrow(item) = currentrow(item).ToString.Trim - Writw the data back to excel
Cheers