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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Inserting rows from a ...
Power Automate
Unanswered

Inserting rows from a DataTable into a word template

(0) ShareShare
ReportReport
Posted on by 3

Hello. 

 

I'm working on a graduate school project. I need to populate a table in a word template with data from either a datatable in power automate desktop, or from a list of xml nodes. 

 

More details below. 

 

I've got an xml file with the contents of a student transcript. I've written 4 xpath queries to get 4 lists of values from the xml file. 

 

I created a data table with 4 columns. Each column corresponds one of the xpath queries. 

 

I created a for loop populate the data table with the contents of each list. 

 

I created a word template and uploaded it to sharepoint. the template has a table with 4 columns and 2 rows. The first row is has the headers. The second row has a plain text content control in each cell. I selected all 4 cells of the 2nd row and added a repeating content section control. 

 

I tried a "for each" loop to iterate on each row in the data table to populate a microsoft word template. But it isn't working. 

 

In word I either see "OBJ" in each cell, or I get the entire list printed in each cell, instead of each element of the list printed in each cell. 

 

I've been searching for a few days now. Folks have only posted this answer using the cloud version of power automate, but I need this to work with other powershell scripts I'm running through the desktop app.

 

All help appreciated. 

 

Thank you

 

Edit: Attaching Screenshots

This is the beginning of the flow. Get files from a directory. For each file loop.  Create table. Read XML. Execute Xpath Expressions. 

ODM_Johnson_1-1709517142044.png

 

then we step into another For Each loop that, for uses the count of the nodes from the xpath expression to insert a new row into the data table. 

 

I've got a message to display the data table as a check to see what it looks like, that can be ignored. 

 

Then I have another for each loop for each row in the data table to fill out a template in sharepoint. 

ODM_Johnson_2-1709517221966.png

 

 

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @ODM_Johnson 

    Thanks for reaching out PAD community forum.

     

    If it's feasible, would you be able to share a screenshot of your flow?

     

    This will help us grasp the exact steps you've taken in the code and enable us to replicate them on our system for further assistance.

  • ODM_Johnson Profile Picture
    3 on at

    Hello @Deenuji, 

     

    I've edited the post to include screenshots of the flow I'm describing. I'm happy to provide any further context if necessary. 

     

    Thank you. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 159

Last 30 days Overall leaderboard