Intro in RPA: Staicu Adelina Nicoleta Nicoleta - Staicu@unibuc
Intro in RPA: Staicu Adelina Nicoleta Nicoleta - Staicu@unibuc
Learning Outcomes
After completion of this exercise you will get familiar with the
following:
✓ “Sequence” and “Assign” activity.
✓ “Comment” and “Annotation”.
✓ “Excel Application Scope” activity.
✓ “Read Range” and “Write Range” activity.
✓ “Sort Data Table” activity.
Number order sorting
Algorithm:
Step 1: START
Step 2: Declare variables as ‘DataTable1’, ‘DateTable2’
Step 3: Add Excel Application scope activity to read the excel file
Step 4: Add Read Range Activity to Read the Sheets
Step 5: Add Sort Data Table activity and change order as Ascending
Step 6: Add Sort Data Table activity and change order as Descending
Step by Step process:
Step 12: Declare the variable DataTable1 in the “Output” Property of “Read
Range” activity.
Step 13: Drag and drop the “SortData Table” activity and change the name it
as – SortData Table – ‘sort the data of the excel sheet in ascending order’
Step by Step process:
Step 14: To sort the data in ascending order, write the following values in the
Properties panel of SortData Table activity as mentioned below.
NOTE:
• DataTable1 declare in the “Input Property” of “SortData Table” activity.
• DataTable2 declare in the “Output Variable” of “SortData Table” activity.
• S.no declare for the name of sorting column in the “SortData Table” activity
Step 15. Select ExcelWriteRange activity from the activities panel and drop it
in the sequence workflow. Rename it as ExcelWriteRange – ‘Write the sorted
data in the specified column of excel sheet’.
Step 16: In the “ExcelWriteRange” property, write the following values in
ExcelWriteRange properties panel:
Note:
• Sheet1 declare in the “Sheet name” of the ExcelWriteRange activity.
• B2 declare in the “StartingCell” of the ExcelWriteRange activity
• DataTable2 declare in the “Input Property” of “Write Range activity”
Step by Step process:
Step 17: Drag and drop the “SortData Table” activity and name it as –
SortData Table - ‘This activity will sort the data of the excel sheet in
descending order’.
Step 18: To sort the data in descending order, write the following values in the
Properties of SortData Table activity as mentioned below.
Note:
• DataTable1 declare in “Input Property” of “Sort DataTable activity”.
• DataTable2 declare in “Output Property” of “Sort DataTable” activity.
• S.no declare in the Sorting column of SortData Table activity.
Step 19: Select ExcelWriteRange activity from the activities panel and drop it
in the sequence workflow. Change the name it as ExcelWriteRange – ‘Write
the sorted data in the specified column of excel sheet’.
Step 20: In the “ExcelWriteRange” activity properties panel, write the
following values in the ExcelWriteRange property panel as mentioned values:
Note:
• Sheet1 declare in the “Sheet name” of the ExcelWriteRange activity.
• C2 declare in the “StartingCell” of the ExcelWriteRange activity.
DataTable2 declare in the “Input Property” of “ExcelWriteRange” activity.
Compare two columns of a
spreadsheet
1. Compare two columns of a spreadsheet
Learning Outcomes
After completion of this exercise you will get familiar with the
following:
✓ “Sequence” and “Assign” activity.
✓ “Comment” and “Annotation”.
✓ “Excel Application Scope” activity.
✓ “Read Range” and “Write Cell” activity.
✓ “For Each Row” activity.
✓ “If” activity and how to set conditions.
Compare two columns of a
spreadsheet
Algorithm:
Step 1: START
Step 2: Read all the rows in Column1 and Column2 of Excel
Step 3: Declare a variable RowNumber
Step 4: If Column1 = Column2 then it is a match else it is not
Step 5: RowNumber = RowNumber + 1
Step 6: STOP
Step by Step process:
Step 12: Declare the variable DataTable1 in the “Output” Property of “Read
Range” activity.
Step 13: Drag and drop the “For Each Row” activity
Step 14: Declare Row in ForEach and DataTable in in section.
Step 15: Drag the “IF” activity from the activity panel and drop it in the
workflow.
Step 16: Inside the “If” activity write the condition “cint(row(0)) =
cint(row(1))”.
Step 17: In the Then section of “If” activity add a “Write Cell” Excel activity
and change the name from “Write Cell” as Write Cell - 'Write "Match" in
each cell if condition is met'.
Step by Step process:
Step 18: In the “Write Cell” activity properties panel, write the following
values in the property panel as mentioned below:
Step 19: In the Else section of “If” activity add a “Write Cell” Excel activity and
change the name from “Write Cell” as Write Cell - 'Write "Not a Match" in
each cell if condition is not met'
Step 20: In the “Write Cell” activity properties panel, write the following
values in the property panel as mentioned below:
Step 21: Drag and drop the “Assign” activity below the “If” activity.
Step 22: Change the “Assign” activity name Assign - 'Increment the
RowNumber variable by 1’
Step 23: Declare the ’RowNumber’ variable in the To box and
‘RowNumber+1” in the value box.
Extracting data from a website
Learning Outcomes
After completion of this exercise you will get familiar with the
following:
✓ “Sequence”
✓ “Comment” and “Annotation”.
✓ “Open Browser” activity.
✓ “Type into” activity.
✓ “Browser scope” activity.
✓ “Extract data” activity.
✓ “Write CSV” activity.
Extracting data from a website
Algorithm:
Step 1: START
Step 2: Open the URL using Open Browser Activity
Step 3: Declare variables as ‘CSVFile’, ‘ExtractedDT’, ‘SearchItem’, ‘URL’.
Step 4: Use the variables in the different activity blocks to search, find
the given item
Step 5: Output the result in the write csv file activity
Step 6: STOP
Step by Step process:
Learning Outcomes
After completion of this exercise you will get familiar with the
following:
✓ “Sequence” and “Assign” activity.
✓ “Comment” and “Annotation”.
✓ “Open Browser” and “Maximize Window” activity.
✓ “Excel Application Scope” and how to set conditions.
✓ “For Each Row”, “Excel Read Range”, “Type Into”, “Click” and “Get
Row Item” activity and how to set variables in a code using “Variable”
panel
Filling a webform from an excel
sheet
Filling a webform from an excel sheet
Algorithm:
Step 1: START
Step 2: Add Browser activity and put
https://forms.gle/BnonGQCaaY8QGzk46 this link inside the browser
activity.
Step 3: Add the Excel application scope activity and add the excel file in
it and read the excel file
Step 4: Add For Each row activity to read the contents of the excel file
Step 5: Add one or more sequence and add Type Into activity in it to
read “FirstName”, “LastName”, etc. (row(“FirstName”)) or Get Row
activity
Step 6: Add Click activity to click “Submit”.
Step 7: STOP
Filling a webform from an excel
sheet with dynamic fields
(optional homework)
Filling a webform from an excel sheet with dynamic
fields
Algorithm:
Step 1: START
Step 2: Go to http://www.rpachallenge.com/ (Input Forms tab)
Step 3: Follow instructions from the site
Step 4: Code, code, code…
Step 5: Run -> Success!
Step 8: STOP