Read Multiple MHT mail and extract the information out

Main.xaml (23.8 KB)

Currently i have done for single email extraction out and output to excel
however now what if i have multiple email that i want to extract out ? how can i do it

I have by saving to mht then using start process to read the save mht then extract the datatable out however now if there multiple there no way it can work ?


Now instead of 1 it got 2 is there any work around ?

Hi @xxGoRpa

Check out the below workflow file.
Main (1).xaml (25.8 KB)

when there are two .mht files the output will be written in same excel but in different sheets. Once test the workflow if it’s working fine.

Happy to help if difficulties faced.

Regards

Hi

is there anyway for it to write to test.xlsx in 1 sheet?

Test.xlsx (9.1 KB)

here the 2 email mht if u need
test.zip (18.4 KB)

1 Like

Hi @xxGoRpa

Check out the below zip file.
Email.zip (167.5 KB)

Output:

Happy to help if any queries.

Regards

1 Like

Hi,

i see if say i would like to append row 3 onward how can i do ?
say now is A3 is the last row on a new email

i can just enable my lastrow back?

@xxGoRpa

Actually lastrow variable is not needed as at last I have used Append Range Workbook it will append the row one by one below. with only single header at first row.

Regards

I see
so it will always write to the last row of the excel?

@xxGoRpa

You gave me example of two emails right it wrote till the third row. For the third Email it will write the details in the 4th row.

Regards

Correct

What happen if now in my excel it just have header now only ?

it will write to 2nd and so on ?

Yes @xxGoRpa. It will write from the second row. As I have given the Write Range to write the Headers the modified code. It will write Headers at run time and append the extracted data from email. So you can just delete the excel and run the workflow your excel will be created at run time with headers and data.

Regards

1 Like

Thanks this help and clarifies a lot :slight_smile:

1 Like

You’re welcome @xxGoRpa

Happy Automation
Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.