For Each issue while execute

Hi, Im new at the community and using Uipath.

I have a situation with a bot that we are using to extract information from a web page. Im using the version 2020.4.3.

Activities:
-Open browser
-Excel Application Scope
–>For Each Row (here I capture o details in a worksheet) >>> this part isn’t working
NOTE: I already check every target
-Close sesion in a browser
-Email confirmation with the excel

Can somebody give me a hit.

best regards

Hi,
did you use read range activity to capture data in datatable? please confirm
share the workflow file for further understanding

can you share the workflow or screenshot of the activity.

image

For each row

Can you please verify the output of data table using ‘Output Data Table’ activity and check the output with ‘Write Line’ activity
If the data is there in the output check your required row value in the ‘For Each Row’ loop.
Please mention the error clearly. I will try to find out the solution

Hi @Carelia :wave:

I see you have used a click activity inside your for each. What is the purpose of that click? Are you trying to navigate to a web page or an application or are you already inside one (opened before read range?)

Also, as a best practice, don’t use your for loop inside the Excel scope.

Kindly give me more details about this click so I can give you a proper response.

Cheers!

Hoping to explain it better:
-Open browser
-Excel Application Scope :
I use a worksheet (Sheet1) where I have a range of data that I need to complete from a web page.

Then I’m using for each row to every data (work order) that I have in the worksheet in order to capture more details from the web page but this it’s been skipped to the log out step.

-Close sesion in a browser

hi there @monsieurrahul

I’m learning uipath … thks for the best practice

Hoping to explain it better:
-Open browser
-Excel Application Scope :
I use a worksheet (Sheet1) where I have a range of data that I need to complete from a web page.

Then I’m using for each row to every data (work order) that I have in the worksheet in order to capture more details from the web page but this it’s been skipped to the log out step.

-Close sesion in a browser

1 Like

@Carelia if I’m not wrong, you want to scrape data from a webpage and insert that data in to your data table?

@monsieurrahul correct

Here’s a better approach:

  1. Read the Excel file and store its result in a DT.
  2. Open browser and navigate to the website.
  3. Run a for each row loop in your DT.
  4. Navigate to the page where you want to scrap data.
  5. Scrap data as required (use Element Exists and other UI activities as required).
  6. Use Add Data Row activity to insert scraped data into your DT.
  7. Close browser after for loop.

Done.