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

How to extract data from html table without hardcoding because every time no. of row and columns can be different in table

How to extract data from HTML table without hard coding because every time no. of row and columns can be different in table

for example

<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>

1 REPLY 1
manuelstgomes
Community Champion
Community Champion

Hi @Tourist 

 

Your question is super interesting but super complex to answer in one reply. So I wrote a blog post and developed a template that you can import with all you need.

https://manueltgomes.com/microsoft/powerautomate/convert-an-html-table-into-a-json/

 

Can you please check if this is what you need?

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members finding the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (3,450)