cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting Create HTML Table Action with HTML

It would be great if we could customize the format of the resulting output from Create HTML table using HTML.

Including:

  • Ability to add hyperlinks
  • Ability to include totals per column.

 

Currently the output table has no formatting available which makes the result look cluttered and inconsistent with the rest of the email:

2017-09-14_15-29-04.jpg

 

 

 

 

Status: Under Review

Thank you for this idea.

Comments
Frequent Visitor

Thanks for this tuto,

I have tried it to generate an HTML document stored in Sharepoint library. It works. 

Straightforward...

Regular Visitor

+1 for hyperlinks.  Column sums would also be super helpful.

Advocate V

When this get implemented, would be very nice to implement to be able to transpose/rotate the data table.

Also as single idea here:

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/A-possibility-to-transpose-rotate-quot-crea...

 

In the single idea first comment, you will find also a thread with ideas for workarounds, but nothing really worked. Or or is a very, very huge and not maintainable workaround. So would be very nice to see it integrated in the "create HTML table"-action itself.

 

For formatting itself, the workaround of Kamil works. But of course a field for simply add html formatting to the "create HTML table"-action itself would be more easy.

 

Helper I

The table formatting did not work for me at all.

 

I don't have Customize HTML Table step option to add.

 

I would like to make spaces between columns as it is all squeezed together

 

also any update on adding hyperlinks to the list items in the table?

 

Wayne

New Member

I needed a formatted table with hyperlinks too and resolved to build it myself by appending HTML strings row by row. It's less convenient for sure, but at least, there is a solution (which I have not seen anywhere else). Here is how I did it:

Initialize a string variable to hold the HTML table and put the headers

 
 

Init.png

In my case, it was:

 

<table border="3" bgcolor="87ceeb"><thead><tr><th>Contract</th><th>Ending Date</th><th>Type</th><th>Description</th><th>Contact</th><th>Path</th></tr></thead><tbody>

 

You just replace/add any header enclosed by  <th></th> .

Loop through all your rows

rows.png

You put all your cells between <td></td>. Some can be hyperlinks (<a href=...) Example:

 

concat('<tr><td>',items('Create_HTML_row_for_each_contract')?['{Name}'],'</td><td>',items('Create_HTML_row_for_each_contract')?['Contract_x0020_ending_x0020_date_x0020__x002F__x0020_Date_x0020_de_x0020_fin_x0020_de_x0020_contrat'],'</td><td>', items('Create_HTML_row_for_each_contract')?['Contract_x0020_Type']?['Label'],'</td><td>',items('Create_HTML_row_for_each_contract')?['Description1'],'</td><td>',items('Create_HTML_row_for_each_contract')?['Contact']?['DisplayName'],'</td><td>','<a href="','https://dfcplc.sharepoint.com/sites/Contracts/',replace(item()?['{FullPath}'],' ','%20'),'">Link</a>','</td></tr>')

 

Close the table

finish.png

You finish with :

 

</tbody></table>

 

(note, I always append to same string)

 

Result in email:

result.png

In the end, it really wasn't that difficult to pull.

Regular Visitor

The hacky way to add hyperlinks to an HTML table right now is terrible.  The typical way is to do 3x Compose and replace() functions. 

 

Also, the ability to format the HTML table (likely via a style-sheet) would be beneficial for better styling in emails.