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

Using Power Automate / Logic Apps to Convert HTML Table Email into CSV

I am developing a PowerAutomate script that will upon email received, convert the HTML table into a CVS or Excel file. More than likely the end script will be updating a SQL table with the data. Any suggestions, Examples for doing this? I have found a few examples but typically its creating expressions using a Split function to grab one or two things from the HTML email and then storing these into an excel spreadsheet. I need to loop through each table ROW and found in the HTML file and store each table row as a row in Excel/CSV.

 

Any help would be appreciated. Here is an HTML code from the email:

 

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta content="text/html; charset=utf-8"></head>
<body>
  <table border="1">
    <tbody>
      <tr>
        <th>Partner ID</th>
        <th>fileName</th>
        <th>fileReceivedDate</th>
      </tr>
      <tr>
        <td>&nbsp;ABCD</td>
        <td align="center">&nbsp;EMEDNY8.DAT&nbsp;</td>
        <td align="center">&nbsp;2020-09-04&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;1234</td>
        <td align="center">&nbsp;ttYankey22099.txt&nbsp;</td>
        <td align="center">&nbsp;2020-09-04&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;xyz123</td>
        <td align="center">&nbsp;SEP2020_182937.837&nbsp;</td>
        <td align="center">&nbsp;2020-09-04&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;1029PPA</td>
        <td align="center">&nbsp;AugMedMed_678.txt&nbsp;</td>
        <td align="center">&nbsp;2020-09-04&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;678dfg</td>
        <td align="center">&nbsp;JUExcel_med.DAT&nbsp;</td>
        <td align="center">&nbsp;2020-09-04&nbsp;</td>
      </tr>
    </tbody>
  </table>
</body>
</html>
1 REPLY 1
Super User III
Super User III

Hey @NETGUY,

 

You can use Muhimbi PDF Convert to Convert HTML to CSV..

 

CFernandes_0-1599816903887.png

 

Output 

 

CFernandes_1-1599817043401.png

 

Note: Muhimbi is a paid service, you find details about their pricing at http://www.muhimbi-online.com/Pricing 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (92,114)