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

Powerapps HTML to PDF Power Automate

Hi, 

 

I have followed Shane's video on how to dynamically export table data powerapps to PDF via HTML and save it to SharePoint. My flow is set up, and my HTML file with my table of data is working perfectly, however, when it comes to the PDF File.My table is only showing one row when in the HTML file has 3 rows. 

 

Followed everything to the book and am not sure what is going off. Any support is appreciated. 

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

I believe the issue is with the table formatting. You have some extra tags and the HTML to PDF converter isn't as forgiving as the browser. The EndDate line needs to have the extra closing td tr tags removed.

 

from: padding: 8px;'>" & EndDate & "</td></tr>" & "</td></tr>"

to: padding: 8px;'>" & EndDate & "</td></tr>"



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Jeff_Thorpe
Super User
Super User

Can you share the HTML that is used to created the PDF? It would help to reproduce the issue and troubleshoot.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Yes sure. 

This is the HTML in the HTML control in powerapps. it is labelled htmltext2

 

"<body>
<h2 style='font-family: Trebuchet MS,sans-serif;'>Improvement Plan</h2>
<table style='font-family: Trebuchet MS,sans-serif; width: 100%; border-collapse: collapse;'>" & "<thead><tr><th style='border: 1px solid #dddddd;
text-align: left;
padding: 8px;'>Action No.</th>
<th style='border: 1px solid #dddddd;
text-align: left;
padding: 8px; '>Action Detail</th><th style='border: 1px solid #dddddd;
text-align: left;
padding: 8px; '>Owner(s) </th><th style='border: 1px solid #dddddd;
text-align: left;
padding: 8px; '>End Date</th></thead>" & "<tbody>" & Concat('Action Log'.AllItems,
"<tr><td style='border: 1px solid #dddddd;
text-align: left;
padding: 8px;'>" & Action & "</td><td style='border: 1px solid #dddddd;
text-align: left;
padding: 8px;'>" & Action & "</td><td style='border: 1px solid #dddddd;
text-align: left;
padding: 8px;'>" & BusinessUnit & "</td><td style='border: 1px solid #dddddd;
text-align: left;
padding: 8px;'>" & EndDate & "</td></tr>" & "</td></tr>"
) & "</tbody>

</table>

 

 

2432B62F-BAA7-40CA-ADE5-DD1FE58D724A.jpeg

Jeff_Thorpe
Super User
Super User

I believe the issue is with the table formatting. You have some extra tags and the HTML to PDF converter isn't as forgiving as the browser. The EndDate line needs to have the extra closing td tr tags removed.

 

from: padding: 8px;'>" & EndDate & "</td></tr>" & "</td></tr>"

to: padding: 8px;'>" & EndDate & "</td></tr>"



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Spot on. Thank you so much. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,494)