Excel for each loop currentrow

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?

Hi @niceok_niceok

You can try this

Excel Application Scope
|-- Assign: counter = 0
|-- For Each Row (in Excel sheet)
|   |-- Assign: counter = counter + CInt(currentRow.ByIndex(0))
|   |-- Write Cell: To write the calculated value to the desired cell
1 Like


use for each row in datatable activity

create output for foreach row in datatable activity a counter

you no need to increase the counter it will automatically incrrement


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