Convert int or string to datacolumn


i need to pass a number or a name to the part where should go a datacolumn “posCol”

i assigned to “posCol” 16 but it say it has to be a datacolumn no integer no string… so how can i convert this integer or even string “16” to datacolumn?

i have to do this way because to find the key name of head is ramdon, sometimes is position 16 sometimes is 13, so i need to give it from the search and assign

tablaExcel.AsEnumerable.Select(Function(a) a(posCol).ToString()).Distinct()


In assign activity
tableExcel.Rows(rowIndex)(“posCol”) = idx
This will update the idx value first row posCol column.

thank you.

Hi @amy93amanda ,

Would you be so kind as to let us know using which condition the Column for that that particular row which satisfies said condition should be changed to 16?

If there is a concrete condition, like if the the row at column 1 contains a given text, and that has to be changed, then I could come up with something for you.

Kind Regards,
Ashwin A.K

i actually need this: posCol has to be assigned but is datacolumn so how should i write an assign with datacolumn = int

thank you

If its just the Column Value for that particular iteration, then shouldn’t this be fine?

Item(ColumnNameorIndex) = "16"

Whereas if you are trying to add a column, then you have to use the Add DataColumn Activity.

Kind Regards,
Ashwin A.K

could it be tha case that colpos is changed during the loop?

i am trying to assigned a position that i found from a name (because no always have same position or same name) so when i get this number or this name i want to assign to datacolumn “posCol”

and has to be datacolumn because the second for each is the datatype that needs.

during the loop nothing changes because is a head of excel