Each for row in Excel function

Hello, I am working on a use case when I want the robot to go through each row in excel (part number) and input it into the ERP system code which will look for the associated part description from the ERP and insert it then back into a the same excel file on the same row as the associated part number. I automated the task for one row, but I am having hard time to use the excel for each row function to make it work for all rows. Not sure if anyone has any suggestions?
Thank you!
J

Hello Jak, Warm Welcome to UI Path community , you are part of our family here.
Could you please share screen shots of your workflow on how you have done for one of the rows so that we could assist you better.
Spreadsheet screen shot will also help a bit.

Thank you Zahid!
Here is the workflow. I can only post one image per post, so i will post them separate.

Jak , as per your last screen shot , are you trying to get the all data from the datatable which is present in your application , if yes can you please use datascrapping which is an easier approach .

Can you share your xaml file here if you don’t mind.

Hi Zahid,

In this particular case, I only need the one field, the name of the PN.
I hope this answers your question.
J

Can you please remove the B2:B3 in the range from For each row , by removing this you are making it read the entire datatable, also when you are trying to Save to remove the cell value B2 , try running your script and see what happens.
Else we need to tweak the UI selector value of GetThis to be dynamic enough to read all the values.

H Zahid,
I did the following, not sure, if that is what you meant. The script still runs the first PN only, it does not go to the second PN row.
Thank you!

image

image

Please update to a newer version of StudioX - 20.4.1. You are using an older “preview” version.

Also, you need to reference “CurrentRow” inside the ForEachRow loop, something like this:

1 Like

Perfect! Thank you so much!!

1 Like