cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Converting Excel to PDF

Hi,

 

I have a workflow that gets SP list items, and inputs them row by row into separate Excel files depending on a criteria, then converts said Excel to PDF. The content used to shrink and fit to a page, however now it doesn't. It cuts the data without shrinking.

 

My basic flow for converting is this:

 

2020-03-16_16-03-00.png

 
4 REPLIES 4
Jay-Encodian
Super User II
Super User II

Hey @Anonymous 

This was reported by another community user - https://powerusers.microsoft.com/t5/Building-Flows/PDF-format-issue-onedrive-pdf-converter/m-p/493831#M61222

Given your Flow hasn't changed, but the output is different it implies the OneDrive service has been updated.

HTH

Jay

Django
Kudo Kingpin
Kudo Kingpin

Hi @Anonymous ,

This may not be solution you are looking for but to reduce dependency on changes like this that we cannot influence directly, I can share how I usually handle Excel to PDF requirements:

  1. Organize you data in one or more tables in your Excel file
  2. List your rows using the Excel connector
    https://docs.microsoft.com/en-us/connectors/excelonlinebusiness/#list-rows-present-in-a-table
  3. For each row add the data you want using an HTML expression with common HTML tags
    https://www.w3schools.com/html/html_tables.asp
  4. Create an HTML file with the File Content being the HTML you want
  5. Convert file from HTML to PDF

This way you have a lot of possibilities to influence the output (also with custom styling, logo's etc):

Again: not a real solution for your actual problem but maybe a different approach 👍

Anonymous
Not applicable

Hi @Django , thank you for your reply.

 

Is this the correct flow for your suggestion? I tried it, and it ran successfully, but I can't seem to open the PDF file (I get an error saying "failed to load PDF document").

 

2020-03-17_17-29-37.png

hi @Anonymous,

It may sound silly but when creating the file you need to determine the file extension (.PDF).

I do this by determining the filename in a Variable or Compose action (because I use it in muliple actions):

PowerAutomateHTMLtoPD10Ffilename.png

and then reference that in the Create file action:

PowerAutomateHTMLtoPD80Ffilecreation.png

 

Also note that you are still creating an .XLSX file? If converting from .XLSX to .PDF in your old flow is causing issues, this new setup will probably not solve those issues --> in my example I create a .HTML file where I can influence the styling and layout more than in a .XLSX file and then convert from .HTML to .PDF

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (38,883)