Write a particular column in data table

excel

#1

Hi Guys,
I need to know how to write a particular column in the data table. I have multiple columns and I have to write to a particular column say, column 5. I have to fill this column alone with multiple values for example: 120 values based on a calculation. Can anyone suggest me how to do the same ?


#2

Hi @Ananthu,

use For each row activity to loop through the data.
Inside the body use assign activity to update the values.
For example: row("Column5")="Yourvalue"

Regards,
Arivu


#3

refer this


#4

Hi @Ananthu,
If you want to write directly to the datatable

dtTable.rows(1) .item(“Column5”)=“The value”
or
dtTable.Rows(dtTable.Rows.IndexOf(row)).Item(“Column5”)=“the value” //Inside the for loop

Regards
Balamurugan


#5

Hi Arivu,
Thanks for the quick reply. But, I have encountered an exception.

Could you please share you views on the above?

Regards,
Ananthu


#7

Hi Arivu,
I got the solution. The below method works fine.

Using the for each row to loop through the data table and using the assign activity as row.Item(“Column_Name”)=“Your_Value”

Thanks for your reply :slight_smile:

Regards,
Ananthu