cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tourist
Helper II
Helper II

I want to extract HTML Table data which is coming in my outlook mail to Parse JSON

I want to extract HTML Table data which is coming in my Outlook mail to Parse JSON, the problem is it is embedded in the email body, and it has CSS too. So how can I extract the table values with their keys from that table to use ??

@Pstork1 @CFernandes @Paulie78 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Hi @Tourist 

Because you are a new member and there are somewhat advanced concepts involved in doing this, I made you a video:

https://www.youtube.com/watch?v=f68e4RP2QTs

See how you get on, if you get stuck I will post the code also for you.

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

View solution in original post

5 REPLIES 5
Paulie78
Super User
Super User

Hi @Tourist 

 

If you want help with your specific example, then it would be helpful if you could provide some sample HTML. In the mean time, I did a video on how to extract data from HTML emails

 

Have a watch of that to get the general idea and then post a sample if you would be so kind.

 

Paulie

Tourist
Helper II
Helper II

Hi @Paulie78 

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta content="text/html; charset=iso-8859-1">
    <style type="text/css" style="display:none">
        <!--
        p {
            margin-top: 0;
            margin-bottom: 0
        }
        -->
    </style>
</head>

<body dir="ltr">
    
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
                <table cellspacing="0" cellpadding="1" style="border-collapse:collapse">
                    <tbody>
                        <tr style="background-color:rgb(255,255,255)">
                            <th
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Roll No</th>
                            <th
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Name</th>
                            <th
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Marks</th>
                            <th
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                City</th>
                        </tr>
                        <tr style="background-color:rgb(255,255,255)">
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                101</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Ayush</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                10</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171); height:18px">
                                Jaipur</td>
                        </tr>
                        <tr style="background-color:rgb(255,255,255)">
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                102</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Dushyant</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                20</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Jaipur</td>
                        </tr>
                        <tr style="background-color:rgb(255,255,255)">
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                103</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Rishika</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                5</td>
                            <td
                                style="width:120px; border-width:1px; border-style:solid; border-color:rgb(171,171,171)">
                                Jaipur</td>
                        </tr>
                    </tbody>
                </table><br>
            </div>
      
    
</body>

</html>
Paulie78
Super User
Super User

Hi @Tourist 

Because you are a new member and there are somewhat advanced concepts involved in doing this, I made you a video:

https://www.youtube.com/watch?v=f68e4RP2QTs

See how you get on, if you get stuck I will post the code also for you.

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

Tourist
Helper II
Helper II

Thank you so much @Paulie78 . It resolved my issue😀😀

pramodklal
Frequent Visitor

Hi @Paulie78  ,could you please share expression of Rows  explained in the video.

could you please guide to store table content in Sharepoint list, table 1st row is heading but remaining rows could by dynamic or not fixed

below is HTML 

<table class=\"MsoNormalTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-collapse:collapse\">
<tbody>
<tr>
<td width=\"208\" valign=\"top\" style=\"width:155.8pt; border:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">Error
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border:solid windowtext 1.0pt; border-left:none; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">Instrument
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border:solid windowtext 1.0pt; border-left:none; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">Back-up Plan Name</span>
</p>
</td>
</tr>
<tr>
<td width=\"208\" valign=\"top\" style=\"width:155.8pt; border:solid windowtext 1.0pt; border-top:none; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">Backup Missing</span>
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">SGSI2MMSHP6D5</span>
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">SGSI2MMSHP6D5_Data_Auto</span>
</p>
</td>
</tr>
<tr>
<td width=\"208\" valign=\"top\" style=\"width:155.8pt; border:solid windowtext 1.0pt; border-top:none; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">Backup status is unknown</span>
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">SGSI2MMSHP6D522.test.com</span>
</p>
</td>
<td width=\"208\" valign=\"top\" style=\"width:155.85pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt\">
<p class=\"MsoNormal\">
<span style=\"color:#002060\">NA</span>
</p>
</td>
</tr>
</tbody>
</table>

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,646)