0% found this document useful (0 votes)
35 views43 pages

Lab Manual Manjiri

Uploaded by

online services
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views43 pages

Lab Manual Manjiri

Uploaded by

online services
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

PRACTICAL NO: 1

AIM: Read and write the data and append it to excel.


STEPS & OUTPUT:
1) Open the new project in UiPath Studio.

2) In the Activities panel, search for ‘Read Range Workbook’ & drag and drop ‘Read Range Workbook’ to the
‘Main Sequence’ in the Designer Panel
3) Now fill the details of the Read Range Workbook like Workbook path, Sheet Name, Range. In the Properties
panel, fill the detail of DataTable of Output by pressing Ctrl+K and enter the variable name data (so that the
data read can be stored in the that data variable).
4) Now in the Activity Panel, search for Write Range Workbook

5) Drag and drop ‘Write Range Workbook’ to the ‘Main Sequence’ in the Designer Panel below the Read Range
Workbook
6) Now fill the details of the Write Range Workbook like Workbook path, Sheet Name, cell. In DataTable, use
‘data’ variable which you have created earlier in Read Range Workbook.

7) Now in the Activity Panel, search for Append Range Workbook. Drag and drop ‘Append Range Workbook’ to
the ‘Main Sequence’ in the Designer Panel below the Write Range Workbook
8) Now fill the details of the Append Range Workbook like Workbook path, Sheet Name. In Data Table, use
‘data’ variable which you have used earlier in Write Range Workbook.

9) Now run the file


10) Initially my ‘data.xlsx’ contains below data:

[Output] After running the PRACTICAL 1 project, this is my final output i.e. changes in the ‘data.xlsx’
PRACTICAL NO: 2

AIM: Prepare a process of sending and receiving mail with/without attachment.


Steps & Output:
(Sending mail with/without attachment)

1) Open the new project in UiPath Studio.

2) In the Activities panel, search for ‘get password’.


3) Drag and drop ‘Get Password’ to the ‘Main Sequence’ in the Designer Panel .

4) Go to ‘Manage Your Google Account’, then go to ‘Security’ and select 2-Step Verification.

5) After Selecting 2-Step Verification, then go to App passwords.


6) To create a new app password, Enter App name and then click on Create & App password is generated, then
copy it.

7) Now paste the app password to the ‘Password’ of the ‘Properties Panel’. Also in Result, create new variable
‘pswd’ using Ctrl+k
8) In the Activities panel, search for ‘smtp’ & drag and drop ‘Send SMTP Mail Message’ to the ‘Main Sequence’
in the Designer Panel under the ‘Get Password’.

9) Enter the details for ‘Send SMTP Mail Message’ like To, Subject, Body.

10) Add an attachment by clicking


*Outputs:
Practical No:3
Aim: Fill the data for collection or to extract from SQL database.
Steps & Output:

1) Run MySQL Installer and install MySQL Workbench.

2) Create a new database in MySQL Workbench.


3) Install and open ODBC Data Sources (64 bit). Go to ‘System DSN’ and then, click on the ‘Add’ option.

4) Here, fill the following details to create a connection with the above MySQL database.

5) Check the connection on ODBC.


6) Now, open the UiPath Studio and create a new workflow.

7) Click on ‘Manage Packages’ from the ribbon tab and install the ‘UiPath.Database.Activities’ dependency.

8) In the Activities Panel, find ‘Connect to Database’ activity. And so, drag and drop the activity into the Main
Sequence.
9) To setup the connection between the UiPath workflow and the MySQL database, click on ‘Configure
Connection’.

10) Next, click on ‘Connection Wizard’.

11) Fill the following details for the connection in the data source and test the connection.

12) In the Properties of the activity, under ‘Output’, create a variable to store the information and carry it forward.
13) Next, find another activity ‘Run Query’ and add it to the Main Sequence.

14) Click on ‘Configure Connection’ to connect the new activity to the previous one.

15) Here, uses the variable made previously as the connection.

16) Fill the following information to send a query directly to the MySQL database to fill data into the
Table.
query: " insert into songs values (3, 'sour diesel'); "

17) To display the result, use the ‘Message Box’ activity.

18) Use the following details for the message box activity.

19) Again, use the ‘Run Query’ to send a query directly to the MySQL database to extract data from the
table.
query: " select * from songs; "

20) Next, create and save a new excel file in a folder. Then, add its path to the activity and other details as
below. Also, attach the variable with the extract SQL data output.

21) Finally, the entire Main Sequence should be like this.

OUTPUTS:
- After Inserting Data into MySQL:

- After Extracting Data from MySQL:

PRACTICAL NO: 4
AIM: Data Scraping using Read Text from Pdf and OCR.
STEPS:
1) First, open UiPath Studio and create a new Project.

2) Click on ‘Manage Packages’ from the ribbon tab and install the ‘UiPath.PDF.Activities’ dependency.
3) Also, install the ‘UiPath.OCR.Activties’ next.

4) Create a Main Sequence and add another Sequence inside it to perform Data Scrapping using PDF technique.

5) In the Activities panel, search for the ‘Read PDF Text’ activity to perform Data Scrapping on a PDF & Drag
and
Drag and drop it to the first Sequence.
6) Now, attach the path of the PDF to read.

7) In the Properties panel of the activity, create a variable to store the output.

8) Next, find the ‘Write Text File’ activity to store and display the scrapped data in a text file & Drag and drop
the activity to the current Sequence
9) Fill the activity by assigning the path of the text file.

10) Additionally, add another Sequence to the workflow, to perform Data Scrapping using OCR technique.

11) Search the ‘Read PDF with OCR’ activity & drag and drop it to the new current Sequence.
12) Assign the address of the PDF file to read.

13) Again, create a variable in the Properties to store the output.

14) Next, find ‘Tesseract OCR’ activity.

15) Now, once again add the ‘Write Text File’ to the sequence.
16) Fill the activity by assigning the path of a new text file.

17) Therefore, the complete workflow will be like this.

OUTPUTS:
- Content in the PDF:

- Result after ‘Read PDF Text’ Activity:

- Result after ‘Read PDF with OCR’ Activity:

PRACTICAL NO:5
AIM: - Write a script to extract the information from Email and to analyse the same.

STEPS: -

1) Open UiPath Studio and start a new Project.

2) In the Activities panel, search for ‘Get Password’ activity to create a temporary password and store it
in a variable & Drag and drop the activity to the Main Sequence.

3) Follow the common procedure and use an app password from the email account and store it in a
variable here.
4) In the Activities panel, search for ‘Build Data Table’ activity to store data from an Email in a
structured format & drag and drop it into the Main Sequence. Then, click on ‘DataTable’ to create
one.

5) Here, add columns and specify their data type & initially, the Data Table should look like this.

6) Now, in the Properties panel of the Data Table, create a variable to store it in.

7) Next, search the ‘Get IMAP Mail Message’ activity & add it to the Main Sequence.
8) Fill the Properties for the activity with such information.

9) Next, find the ‘For Each’ activity under ‘Workflow’ in ‘UiPath.System.Activties’ section & Drag and
drop the activity to the Main Sequence.
10) Do the following and assign the variable with the emails in this activity.

11) Next, find the ‘Multiple Assign’ activity under ‘Workflow’ in ‘UiPath.System.Activties’ section &
Drag the activity and drop it in the ‘Body’ section of the ‘For Each’ activity.

12) In Multiple Assign, create variables in the ‘Save to’ part and assign their function in ‘Value to save’
part, such as below.

EmailDate = item.Headers("Date")
EmailFrom = item.From.AsText()
EmailTo = item.To.AsText()
EmailSubject = item.Subject.AsText()
EmailBody = item.Body.AsText()
13) In the Activities panel, search for ‘Add Data Row’ activity & Add this activity, after the ‘Multiple
Assign’ one, in the ‘Body’ of the ‘For Each’ activity.

14) Fill the activity like this, by mentioning the variables with the Email data and Data Table.

{ EmailDate , EmailFrom, EmailTo, EmailSubject, EmailBody }


15) Further, find the ‘Write Range Workbook’ activity and add it after the entire ‘For Each’ activity.

16) Assign the path of an existing Excel file and also, add the variable with the Data Table created.

17) Finally, the entire complete process looks like this.


Output:
- Email Data Extracted and Stored in Excel File:

PRACATICAL NO:6

AIM: Write a script to extract weather forecast data of Mumbai through web scraping and export it to
excel file.
STEPS:
1) Open UiPath Studio and start a new Project.

2) In the Activities panel, search for ‘Build Data Table’ activity to store output data & add this activity
to the Main Sequence.

3) Next, create a Data Table with columns as seen below & In Properties, create a variable to store this
data.
4) In Activities, find the ‘Use Application/Browser’ activity & add it to the Main Sequence.

5) Here, indicate to UiPath what action to take. So, keep a Google Chrome window open. Then, click
on ‘Indicate Application to Automate’ option in the activity and when the screen shows highlights
on different applications, click on the running Google Chrome browser.
6) Next, in the Activities panel, search for the ‘Type Into’ activity under
‘UiPath.UIAutomation.Activites’.

7) Then, drag and drop it in the ‘Do’ section of the ‘Use Application/Browser’ activity.
8) Keep a Google Chrome browser open. Then, click on ‘Indicate in Chrome: New Tab’ in this
activity. This will open the Chrome Window and highlight the possible actions. So, click on the
search bar and then, click on the search icon. Lastly, click on ‘confirm’ in the open UiPath
dialogue box.

9) Next, in the Activities panel, search for the ‘Get Text’ activity under
‘UiPath.UIAutomation.Activites’.
10) Again, drag and drop it in the ‘Do’ section of the ‘Use Application/Browser’ activity, after the
‘Type Into’ activity.

11) Open Google Browser and search ‘temperature mumbai’. Keep this browser open and then go to
the project. Click on ‘Indicate in Chrome’ in ‘Get Text’ activity. Then, as the tool highlights all
elements on the open Google Chrome tab, click on the one showing the temperature and confirm
it.

12) Create a new variable and store the data.


13) Repeat the process to create the ‘Get Text’ activity twice consecutively to extract data about
Humidity and Wind from the browser. And then, store their values by creating respective variables
for each of them.

14) In the Activities panel, search for ‘Add Data Row’ activity.

15) Add this activity after the last ‘Get Text’ activity.

16) Further, find the ‘Write Range Workbook’ activity and add it after the entire ‘Use
Application/Browser’ activity.
17) Assign the path of an existing Excel file and also, add the variable with the Data Table created.
- OUTPUTS:

You might also like