web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create PDF FOR EACH ro...
Power Automate
Unanswered

Create PDF FOR EACH row in Excel table

(0) ShareShare
ReportReport
Posted on by 259

This should be fairly straightforward but I'm struggling to get the result I need..

 

I have an Excel (it could live on SharePoint or OneDrive) and each row is a set of data.

 

I need to be able to loop through each row and create a PDF file with data from each row - so I quickly knocked up a flow:

2019-08-14_14-21-16.jpg

 

however I'm getting this error message: 

BadRequest. The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.

Where did I go wrong!? How do output an array from the List Rows method?

Thanks in advance

Categories:
I have the same question (0)
  • Gristy Profile Picture
    2,429 on at

    Hey mate,

     

    It worked for me without the loop

     

    1.png

     

    The output

     

    2.png

     

    I could not give a space in the header column, so where a space is needed i used a compose.

     

    3.png

  • beebul Profile Picture
    259 on at

    @Gristy - whoops I didnt' explain very clearly!

    Sorry yes that works but I want a new PDF created for every row..

     

    So if this is my data

    1.jpg

    I get a file output similar to this - so I would get 4 PDFs in this instance:

    2.jpg

     

    But then, to make things more complicated, my actual desired output would look something like this, where this is the data from the first row:

    cheese.jpg

     

    Good tip on the compose for the space in the table header though... Thanks mate!

     

     

  • Gristy Profile Picture
    2,429 on at

    Do the following:

     

    1. Add OneDrive -> Create File with filename: temp.htm

    2. Add OneDrive -> Convert File with the ID of step 1 and target type PDF

    3. Add OneDrive -> Create File with the FileContent from Step 2 and the name you desire

    4. Do whatever you want with the PDF

    5. Add OneDrive -> Delete File and Delete HTML and PDF

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @beebul 

     

    You might want to try initialising an array variable and then set the current row item to that and then create the table, add some text using the compose action and then create a pdf out of it. Here is a sample flow for the same: 

     

    A1.PNGL2.PNGL3.PNG

    Hope this Helps!

     

    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!

  • beebul Profile Picture
    259 on at

    @yashag2255 - Yes I managed to get pretty much what I needed from your answer - Cheers

    @Gristy Cheers for your help to - top tips 🙂

     

    You both get an honorary degree - Bachelor of Cheese ... thank you!

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @beebul 

     

    Glad I was able to help!

     

    Extremely honored to get the "Bachelor of Cheese" and we hope to soon get the "Masters of Cheese" so keep posting Smiley Wink

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard