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

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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,571)