Remove "%" from all the cells of a column WITHOUT for each

Hi,

I have a Datatable and there is column name “Percentage”, it has values likes 20%, 40% etc. I want to remove “%” from the cells of this column.

I cannot use for each activity because there are 10k rows so it always gives error on somepoint and takes to long to finish.

Thank you.

Hi @jntrk

Try with this buddy

dt1.AsEnumerable().ToList().ForEach(Sub(row)
row(“Percentage”)= row (“Percentage”).ToString.Replace("%",""))

Use invoke code for this

1 Like

you can use assign activity like below.

dt = dt.AsEnumerable().Select(
		Function(r)
			r("Percentage") = r("Percentage").ToString().Replace("%","")
			Return r
		End Function
).CopyToDataTable()

AHH thank you, it works.

thank you as well :slight_smile:

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