Hi Team I have to add a column serial number which should start from 0. No need to add header to the column. I have around 600 entries in that data table. can anyone please help me
Hi
Hope the below steps would help you resolve this
-
Let’s take like you have a datatable named dt
-
Now use a ADD DATACOLUMN activity and pass the columnname as “FinalColumn” and datatable as dt
I have mentioned in the next step on how to change this column name to value 0 -
Now use a assign activity like
dt.Columns(“FinalColumn”).ColumnName = “0”
-
Now use a FOR EACH ROW activity and pass dt as input
-
Inside the loop use a assign activity like this
CurrentRow(dt.Columns.Count-1) = (dt.Rows.IndexOf(CurrentRow)+1).ToString
This will update the serial number till last 600th row
Cheers @abhide
CurrentRow(dt.Columns.Count-3) = (dt.Rows.IndexOf(CurrentRow)).ToString
After this it worked
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.