Перейти к содержимому

How To Use For Each Loops in UiPath (Full Tutorial)

Anders Jensen

0:00 / 0:00

How To Use For Each Loops in UiPath (Full Tutorial)

23 727 просмотров · 4 года назад
Anders Jensen
92,3 тыс. подписчиков
23 727 просмотров · 4 года назад
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. Join my community, 7-day free trial: https://iloveautomation.ai/community 📂 Download the Course Materials: https://www.andersjensen.org/lesson/f... VIDEOS FOR YOU: 🔹 My RPA Developer Salary:    • My RPA Developer Salary & Pay (with RPA Re...   🔹 Specialize in THIS and get an RPA Job:    • Specialize in THIS and get an RPA Job (Eri...   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