Filling Up Blank Cloumn-DT


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 :slight_smile:

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…



Hi @prasath17

set the argument type of Dt as IN/Out instead if In


Thanks Prasath, Hiba, Nived. This works fine :slight_smile:


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