Replace particular column value of data table

Dear Forum members,

I have scenario where i have a data table with 4 column. And I want to replace the particular column value with another value.

for ex. i have 4 column in my data table, like

name income city company
John 200 USA ABC
Bro 500 AMR GHJ
Brew x IND APR

So i want that in income column where is exactly “x” then should be replace with some another value.

Please help, if any linq query for this.

Thankx in advance

Hi @Yankit_singh
it is possible by this way

Read the excel and store in dt1

then use the invoke code activity with dt1 as in/out argument

dt1.AsEnumerable().Where(Function(row) row(“income”).ToString.Equals(“x”)).ToList().ForEach(Sub(row) row(“income”)=value)

here value is where u need to put the value to replaced with x

Nived N
Happy Automation

1 Like

@NIVED_NAMBIAR Thankx for reply

I have tried this way. it’s giving an error like

No compiled code to run
Expression is not an array or a method, and cannot have an argument list. At line 1


I think you need to change the type to

Can u share the screenshot pls?


Thankx for response, it’s worked for me.

1 Like

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