Add data from mail body to excel file

Hello All,
I need some help regarding how I can paste this data into an excel file…

this is actually the mail body

@Pranay_Kumar_Bose

Download the mail as .eml file and the use the start process activity to open the file and then use the use application/browser activity and within the use application/browser activity use the extarct data table activity and store the data in a variable and use the write range activity and write the extracted data into an excel.

Note change the use application/browser activity seetings as below

Close ------- NAppCloseMode.Never
Input Mode ------------ Simulate
Open   --------------   NAppOpenMode.IfNotOpen
Window attach mode ------ Single window

Regards

Hi @Pranay_Kumar_Bose

Use the save mail message activity to save the mail as .msg file.
Use start process to open the file on the screen.
After that use extract datatable activity to extract the table as datatable.
Use the write range workbook activity to write the datatable to excel.

For the extract datatable activity use the classic activities.
Otherwise for extract datatable activity in modern you have to encapsulate with Use application\browser activity. Pass the .mht in Open application\browser activity.

Hope it helps!!

Hi @Pranay_Kumar_Bose

1.Use Get Outlook Mail Message activity
2.Then use Save Mail Message activity in mht format
image
3.Use Application/Browser activity in that give mht file.
4.Extract Data Table activity.

The flow of process

Regards,

@Pranay_Kumar_Bose

1 Like

Hi @Pranay_Kumar_Bose

Check the thread below

Hope it helps!!

Hello @pravallikapaluri , I had a look at this post earlier. They have used regular expression and I am not able to understand how to use them… as also, the expression in that post is for that particular operation.

Is there any simpler way out than using extract data table or Data scraping etc… cuz I need to extract data from multiple mail body and paste in a single excel sheet one after another

@Pranay_Kumar_Bose

Create one data table at starting then in for each take add data row activity after for each take write range workbook activity

I did follow the process as said above i.e by using extract data table…
Now am facing a problem in which though there are multiple files, excel data shows same data in all the sheets.

Hi @Pranay_Kumar_Bose ,

Have you tried the below Component in Marketplace ?

@Pranay_Kumar_Bose

In extract data table activity please do the below changes.

Copy and remove the entire data from strict selector and then paste that data into fuzzy selector and also change the targeting method from strict to fuzzy.

Now you can run the bot and the data in sheets will changed accordingly.

Regards

@vrdabberu

Followed those steps mentioned

Followed the steps u mentioned, but no changes… It’s still copying same data into all excel sheets

@Pranay_Kumar_Bose

Can you share the workflow?

Regards

@vrdabberu ya sure…

Please configure the location according to your needs

@Pranay_Kumar_Bose

It shows the invalid file please resend it.

Thank You

let me check once

@vrdabberu

@vrdabberu
Sharing the whole file…
Plz check once now

@Pranay_Kumar_Bose

Here is the modified xaml please go through its working fine now.

Uipath (2).zip (357.5 KB)

Hope it works!!

@Pranay_Kumar_Bose

If you find the solution for your query please do mark as solution to close the loop

Happy Automation!!