Forwarding table from mail body

Hi all,

I am trying to forward two tables (each from seperate mail) in one mailbody, but I dont know how to extract the tables from the other informations in the Body. I know, that i can copy the mailbody as an html string. But currently Im stuck. I would appreciate it, if someone could help.

Thanks in Advance

Kadir K.

Hi @kadir.kilincarslan

Check this link

There is an activity for extraction of tables from mail

Hope it helps you

Regards

Nived N :robot:

Happy Automation :smiling_face::smiling_face::smiling_face:

1 Like

Hi @NIVED_NAMBIAR,

the issue is following: I get two different mails with a certain format, a little bit text and one datatable in each. I want to copy these two datatables in one mail to forward it, without changing the format, but in the mail body. Not as an attachment. If I extract it as a DataTable type, I am loosing the format. I thought about extracting the DataTables by html tags but it is too complicated….

Regards
Kadir K

Hi @kadir.kilincarslan

Why can’t u try that activitiy of extraction of tables from email as specified in previous reply

Extract these two tables and attach in mail body

2 Likes

It has 2 reasons

  1. It returns only the dataset without any format
  2. I do not know how to attach it in the mail Body

I can paste the datatable in another mail if I copy the whole html code of it. But I only need the table, without all the other informations above or under it.
Another issue is, that the html includes lots of format codes, which are making it more difficult than it is.

Hi @kadir.kilincarslan

Can u send the screenshot of tables which is to be joined and resulting table which is to be joined ?

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

Hi @NIVED_NAMBIAR,

unfortunately, it contains sensible data. I do not want to join the tables. I only want to copy each from mail a and b to mail c. The result should be two tables among themselves.

Currently I am trying to do it by getting the htmlcode with mail.Headers(“HTMLBody”).ToString, editing it with regex (to delete all the other elements except the table itself)and after that, pasting the html code in the email body.
I do not know whether it will work but we will see. Do you have any other ideas?

Nevertheless, thx for your effort :slight_smile:

Ya @kadir.kilincarslan

I will try with some sample table data and let u know @kadir.kilincarslan

1 Like

@kadir.kilincarslan According to your requirements, this should be the ideal case. We just need to get the HTML Table format Code and append it with other HTML table code and use it as the Mail Body. As you have mentioned, regex should work in a very good way.

1 Like

Hi @kadir.kilincarslan
I try to do a sample workflow

Not the complete But i had done the operations after the extarction of table from mail body ,
how it can be appened in single mail body like this
image

For extarction of data from the mailbody u can either use the activity of extraction of table from mail or can follow the below link : Extract table from email body

Also try this way of extracting table from mail body
After getting html format of tables from mail body try to split the text since the html part of tables has tag named lke that , do some string manipulation accordingly to get only data between <table></table>

After extraction of datatable , u can follow the steps in workflow for understanding the logic part : Main.xaml (23.6 KB)
sample1.xlsx (8.2 KB)
sample2.xlsx (8.2 KB)

sample excel files used for demonstarting this

i had designed the workflow which write the datatable irrespective of no of columns in the datatable

Hope it helps you

Regards

Nived N

Happy Automation

1 Like

And it worked. It was just a little bit difficult because of the huge HTML Code:slight_smile:

Thanks for helping, I solved it by editing with Regex :slight_smile:

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