In the UiPath application, how can one define a row after the currentrow.byindex(0) definition, that is, currentrow.byindex(0)+counter, in the for each row loop, in the type activity, within the excel scope?
Hii @niceok_niceok
If you want to update the value in the cell one column to the right of the current row, you can do this by incrementing the value of CurrentRow by index (0) and then using an assignment activity…
Set up a For Each Row loop to iterate through each row in your Excel worksheet.
Use the Type Into
activity to input the value of CurrentRow by index (0) into a variable. You can store it in a variable(cellvalue)
Create a variable (counter) to store the value by which you want to increment the current cellvalue.
Add an “Assign” activity within the For Each Row loop after the “Type Into” activity. In this activity, you can increment the cellValue by the counter
value.
Use another Type Into
activity to write the updated value (cellValue
) back into the Excel worksheet.
Cheers…!
you can define a row after the currentRow.ByIndex(0) using a DataTable by indexing the row with counter
currentRow = yourDataTable.Rows(counter + currentRowByIndex)
Assign the row to currentRow after adding the counter value to the index of the currentRowByIndex .
cheers…!