How to make read cell and write cell with iteration in for each

datatable
excel
uiautomation

#1

I have a problem.
I want to read cell (from excel) and write the same cell next to. (B2 to C2). how to do it with for each loop.
I don’t know how to make a iteration in read cell (B2 -> B3 ->B4…) and write cell(C2->C3->C4…)


#2

Hi @janusz_robot

In UiPath, it is easier to load your Excel file to a DataTable using Read Range activity.

You can then perform operations on the data table by using For Each Row activity. This will iterate through every row of your DataTable (which at this point mirrors your Excel file).

After you are done, you can save your modified DataTable back to the Excel file using Write Range activity.

You will find plenty of examples on the forum on how to manipulate data in your DataTable :slight_smile: