cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GrafZahl
Frequent Visitor

Taking a Power Query generated data table from CDS and inserting it into a Word document.

I have previously used the Excel Power Query transformation function to create a required table of data. This could be easily manually copied and pasted into a Word document (headers and content, as-is). However, I would like to automate this. Within Word I have previously worked Content Control fields and populated a template successfully with manually triggered data, so I am familiar with that process. However, I have not done this for tables before.

 

I'm now moving my data into a CDS table, and I'm looking to replicate that Power Query to create/update the same table in CDS, with a view to using Power Automate to grab that data table and insert it as a table in the Word document template.

 

Assuming that I have my data available in CDS, how do I reference my transformed PQ-generated table in my Power Automate flow and insert it into a specified place in the Word document?.

 

Any help would be greatly appreciated!. Thanks in advance 🙂

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @GrafZahl 

 

Can you share more details on data that needs to be populated in Word? I have published this post on how to populate repeating control (basically a table with data from excel) that can be used for populating data from a cds table as well. https://www.bythedevs.com/post/how-to-populate-a-word-template-with-repeating-control 

 

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!

 

Hi yashag2255,

 

Thanks for the update - this looks very useful.

 

My requirements are pretty simple: the solution needs to create a table of data (like Insert/Table in Word) and insert it at a given point (referenced via Content Control in the Word doc, or some other method).

The table of data could be created by an SQL query, but at the moment I can get the table view of my data by running Power Query to transform the data. It literally just needs to paste that, as is. I don't want to link explicit SQL statements in my Word document - I've done this before and it's too messy. I want to be able to control what goes into the Word document by having a reference point (like a CC) and then whatever is linked to that gets pulled into the Word document at that point.

 

I hope this helps.

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,834)