Extract Datatable from Email and Paste the data in predefined excel

I have an excel spreadsheet with 5 columns namely ABCDE. CDE columns should be updated with the data taken from table1 and AB should be updated data taken from table2 from the email body.

However, when I am taking an email saved in one of the folder… It reads only first email as the subject line is being updated on the datatable (Target : Strict Target Selector) which I have extracted within the “Extract Table Data”. its not further moving with other emails even though the subject line matches



Can you please post what exactly you are doing right now so that will get an idea of the issue

Also little bit elaboration of the use case like are you getting only 2 mails of the similar subject each one two different tables stated above

How you are retrieving the mails like wise

This way some body can help you



I have emails with subject line as “Alter” in my mailbox within a folder called as “Events”

BOT should go to each and every email in the folder and extract bot of the tables and paste the same in excel in a desired format.

Format has been mentioned in above picture for table 1 & 2 in email as how it will be updated by the user.

This data or table (both) to be taken from the each email in the folder and paste it in the Excel spreadsheet saved in the X drive with format as mentioned in the above picture ( Refer Output ).

P.S : All emails in the folder will have similar table and data would be different for every email. However, this needs to be checked at a later stage to understand if there duplicate data the same needs to be removed.

I got your requirement that every mail will have both the tables , need to consolidate all the data into excel for that particular run

As you mentioned something like strict target , are you using UI activities for mail?

Can you please explain up to what step you have done what exactly you are having issues



Below are the Activities which I have used.

1.Use Desktop Outlook App
2. For Each Email
3. Extract Datatable - Saves as DT1
4. Extract Datatable - Saves as DT2
5. Use Excel File
6. Write Datatable to Excel for DT1
7. Write Datatable to Excel for DT2

It writes DT1 and when it comes to DT2 it pastes somewhere else even though I have given a cell reference.
Also, in the DT2 I dont need Information & Status, I just need XYZ value and 223345 value to be pasted across A & B column considering the last updated row in C column based on DT1 Data.

I have tried append data and find first and last row… Nothing is actually working out in my way

if you are using modern activities

While writing data uncheck headers for this so it will write only values

use the format cells activity their you define alignment as fill down so that it will auto populate based on the values present in the c column

Can you recheck on what basis you are providing the cell reference to write data

or try first write dt2 and later write dt1


Sure , we will give it a try and let you know the outcome… Thank you so much for providing your response.

@LAKSHMI_NARAYANA_PEMMASAN Above steps did not help me in resolving the issue which I am facing in Studio X… Due to restrictions I cannot switch over Modern or classic view within Studio X

can you elaborate at what steps you are having issue?

currently what is design you are using ? is it modern or classic?

Edit : Please provide the screen shot of the flow


I am using Classic and as requested I am sharing screen shots of the workflow

looks like you are using modern activities

As you mentioned you are extracting 2 tables but i can see only table

are you not able to see autofill activity under excel

while writing the data first write dt2 and next write dt1


@LAKSHMI_NARAYANA_PEMMASAN Absolutely you are right…

I am trying with First DT1 to get this data pasted for every email in Excel by finding last row… However, as this is not working out… I haven’t moved to the next step of taking DT2 and pasting it in Excel.

I will give a try with your solution and will update you shortly.

Main Issue is finding a lastrow in a specific column from the excel workbook … If this is getting solved I believe other issues can be managed @LAKSHMI_NARAYANA_PEMMASAN

if you want to find last row

can you check if you can find this activity

this will give you last row

or you can do is read the total table and get total rows by dt.rowcount in assign activity then you can use that