This full video tutorial shows how to use For Each Loops in UiPath. The guide covers Each Excel Row, For Each Row in Data Table, For Each, While and nested For Each Loops. We build the For Each examples in UiPath Studio, and I explain everything.
📂 Download the Course Materials: https://andersjensen.org/for-each-loo...
VIDEOS FOR YOU:
🔹 My RPA Developer Salary: • My RPA Developer Salary & Pay (with R...
🔹 Specialize in THIS and get an RPA Job: • Specialize in THIS and get an RPA Job...
👨👩👧👦 Discord: / discord
- Join my network with +1500 RPA Developers, where we solve RPA problems, network, and help each other upgrade our careers. It's free!
FOLLOW ME:
💼 LinkedIn: / andersjensenorg
📸 Instagram: / andersjensenorg
👨 Facebook: / andersjensenorg
🐦 Twitter: / andersjensenorg
💌 Email Newsletter: https://andersjensen.org/email-newsle...
MY GEAR (Amazon affiliate):
🖥️ My monitor
Samsung 49-inch CRG9 Curved Monitor = https://geni.us/MDpejc
- If you are buying this, I can recommend the Mi Monitor Light Bar = https://geni.us/3Wwad
💡 Lights
IVISII 19 inch Ring Light and Stand = https://geni.us/fVCH3IC
Godox TL60 RGB Tube Light = https://geni.us/u0hxf
⌨️ Keyboard
Logitech Backlit Keyboard = https://geni.us/aT0ltB
📹 Camera
Sony FDRAX53-B = https://geni.us/gnAE
Lenovo 500 Full HD Webcam = https://geni.us/cZS4
🎤 Microphone
Rode Wireless GO II = https://geni.us/iqy0g6H
Blue Yeti = https://geni.us/dDBjCB
0:00 Intro
We are creating all the For Each loops of UiPath in this video tutorial. Remember to open up UiPath Studio and build with me - you'll learn much faster.
0:35 For Each Excel Row
We use the native Excel activities in UiPath to work with Microsoft Excel. In the first example, we want to iterate through each row in an Excel sheet, make an If condition, and update an Excel column. Use the Excel Process Scope and a Use Excel File to define the Excel scope and choose the .xlsx file. Then, in the For Each Excel Row, we automatically select our sheet name (or range). To convert the Excel value to an integer and use it in the If condition, we convert the Excel object to a string and an integer. Finally, use the Write Cell to write the value in the Excel cells.
9:48 For Each Row In Data Table
To iterate through Data Rows in a Data Table, we use the For Each Row In Data Table activity. First, read your Excel sheet into a Data Table with a Read Range. Then, again use an If activity to ask a question in the condition and use the answer to update the Data Table values. Finally, to edit a Data Table cell, we use an Assign with a simple expression.
20:23 For Each Loop
We use a For Each to iterate through collections like Arrays, Dictionaries, Lists, IEnumerables, etc. Remember to change the TypeArgument in Properties. We use the For Each on an Array, but the intuition is the same.
27:30 While (vs. For Each) Loop
The While loop is often confused with the For Each loop. Both are used to traverse through a collection, but the For Each stops when each item is processed, whereas the While continues until the condition is met.
31:58 Nested For Each Loop
We use a nested For Each loop to compare two Excel sheets (Data Tables). To stop a For Each loop, we use a Break activity.
#uipath #rpa #automation