Extract a table from outlook mail and then store the values in an excel table

Hi All,

I want to extract the values from an excel table the methods that have been posted here is not working out.I have a condition specified which will search for subject with Invoice details and if found will store the values of the email body.
I am using System.Text.RegularExpressions.Regex.Replace(item.Headers(“HTMLBody”),“(<.?>)|({.})|(.[})–{;]\s?\r\n)|(\r?\n@.)|(.*[}{;]$)”,String.Empty).Trim and I get the values in a string
string[1] { “P \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nInvoice Number\r\n\r\n\r\n\r\n1234234,\r\n\r\n\r\n\r\n1233434,\r\n\r\n\r\n\r\n4353453,\r\n\r\n\r\n\r\n5764645” }
Also,When I have two mails the regex catches only one and not the other mail body.

Please can someone assist me.

Thank you,
.Sequence.xaml (14.1 KB)

In this instance Regex will grab the first solution it matches not all.

Try putting putting the regex in a set of brackets () and then copying it again and putting it again in brackets (). I think it will then grab a second ‘match’ it finds.

Use the following for each match to view results.

Match 1:
Match 2:

It’s a long shot, but looking trying to help :slight_smile: