Is there a way to update a specific column in a DataTable in Uipath with the rowIndex known

Is there a way to update a specific column in a Datatable in Uipath with a rowIndex known.

2 Likes

Hi @mailsmithash

Use add data column activity and you can mention the index and column name

Thanks
Ashwin S

The Add Data Column Activity adds a new Data Column to the Datatable. There is no option of index in the Add Data Column there. In this case i already have a column in a Datatable just need to update its value , i know the rowIndex.

Hi
Yah of course we can using a assign activity like this
datatable.Rows(rowindex)(“yourcolumnname”) = “your new value”

Cheers @mailsmithash

3 Likes

@mailsmithash You can assign value in this way , Give it a Try :
DT.rows(rowIndex).item(“ColumnName”)

Hi @mailsmithash
use excel application scope and do insert/delete columns

Thanks
Ashwin S

datatable.Rows(rowindex)(“yourcolumnname”) = “your new value”
And
DT.rows(rowIndex).item(“ColumnName”)

is working fine for update.Thanks for the solution.

Was looking for solution without iteration of rows in Excel as there are 1000s of rows in the excel.Doing a Lookup Activity on DataTable to get the rowIndex and then update a specific column in that Row.

1 Like

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