shrayud
(Shrayus)
1
Hi,
I have a DataTable where ColC is blank:
ColA ColB ColC ColD
1 Acdd 5678
2 fghh 8900
3 gdhd 4477
I have to convert it to:( Population the entire col with “new”)
ColA ColB ColC ColD
1 Acdd new 5678
2 fghh new 8900
3 gdhd new 4477
How can I achieve this? Thanks 
Hiba_B
(Hiba Beldi)
2
Hi @shrayud !
The first thing that comes to my mind is the following:
- read range activity, and as an output DT (check add headers)
- foreach row in DT, assign row(“ColC”) = “new”
- write range activity (check add headers)
1 Like
@shrayud - As an alternate if you have more rows and then you want to avoid “For each” - you can try like this…In the “Invoke Code” Activity…
dt.AsEnumerable().ToList().ForEach(Sub(row) row(“Test”)= “New”)
My Output(I tried to write “New” in my Test Column…

3 Likes
Hi @prasath17
set the argument type of Dt as IN/Out instead if In
2 Likes
shrayud
(Shrayus)
5
Thanks Prasath, Hiba, Nived. This works fine 
2 Likes
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.