Loop through all the cells of a datatable


I have a sample datatable below :


The target datatable will have arround 80 columns and several thousands rows.
I need to loop through all the cells of the datatable in order to check if the value contains “;” and remove that character.

Could you please help me with a LINQ query for that ?

Thank you.

1 Like

thanks for your PM
Ensure that any Double Quote is of " and not changed e.g by copy / paste code snippets


let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace(";","")).toArray()

It works.

Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.