问题
I have tried several ways but somehow they dont look clean;
- I have a URL file in Excel format (400+ urls in a column)
- I want UiPath to read from that file and browse these URLs one by one
I tried with making "Navigate to" read from a variable that reads from Excel but it just gets messy and does not work.
anyone can suggest some easy way to do it?
回答1:
Please elaborate what you want to do.
As per my understanding, you have a Excel file with a column containing the URLs and you want to visit each one - in this case:
- Take one excel application scope activity Give the path of your excel file...Create one DataTable object.
- Use a
For Each Row
activity, providing your DataTable object. - Within the loop, use an
Assign
activity, and seturl=row.Item("urlColumnname").ToString()
- Use an
Navigate To
activiy to visit each URL.
回答2:
Make sure your "Navigate to" activity is surrounded with an "Open Browser" or "Attach Browser" activity.
Additional tips will be:
- Use IE, while chrome and firefox plugins are available IE is natively supported.
- Consider adding a "delay" activity after each "Navigate", this is specially when your network is slow or you have low latency causing the robot to go faster than the browser itself and therefore, causing problems reading your selectors.
来源:https://stackoverflow.com/questions/51461100/looping-on-urls-from-excel-file-using-uipath