cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NETGUY
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
CFernandes
Super User
Super User

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
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (3,229)