cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jed76
Post Prodigy
Post Prodigy

Sending a gallery to Word template

Hi

I am creating a quotation tool which outputs the final rows into a gallery. I have used POwerAutomate in the past to generate a Word document based on mapping certain fields etc. but is there a way to export an entire gallery of items to a Word document? The issue I have with creating a Word template is that obviously I'll never know how many fields I need as each time the list of rows will change. 

 

I'd like to be able to send the gallery to a Word template and then create a PDF from there.

 

I have looked at the Print() function in Power Apps, which kind of works, but it's limited to a single page.

 

Many thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
LaurensM
Memorable Member
Memorable Member

Hi @jed76,

When you want to fill a Word template with an unknown array of items, you will need a repeating section in the template.

 

@mdevaney has a very nice written tutorial on this, could you take a look if it would help in your case?
After the template is filled, you can use the Convert to PDF action.

 

I hope this helps!

View solution in original post

jed76
Post Prodigy
Post Prodigy

Fantastic - thanks so much! I found something similar but it didn’t have as much detail so this looks great!

View solution in original post

5 REPLIES 5
LaurensM
Memorable Member
Memorable Member

Hi @jed76,

When you want to fill a Word template with an unknown array of items, you will need a repeating section in the template.

 

@mdevaney has a very nice written tutorial on this, could you take a look if it would help in your case?
After the template is filled, you can use the Convert to PDF action.

 

I hope this helps!

jed76
Post Prodigy
Post Prodigy

Fantastic - thanks so much! I found something similar but it didn’t have as much detail so this looks great!

jed76
Post Prodigy
Post Prodigy

@LaurensM Only thing with this article is that I need the data to come from a filtered gallery rather than a SP list. I think I still need to implement JSON for this?

LaurensM
Memorable Member
Memorable Member

@jed76 indeed your case will differ in the way the data is sent to the flow.
If your data is in a collection, you can use the JSON() function as the flow input parameter to send the data to the flow. e.g. FlowName.Run(JSON(colName))

jed76
Post Prodigy
Post Prodigy

I’ve tried that by sending my filtered gallery to it via JSON and I can only get three of my columns to appear in the JSON output. I am having to use the “ignoreunspportedformats” and I wonder if this is causing issues? 

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,036)