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 / Automate Excel to Word...
Power Automate
Answered

Automate Excel to Word creating new file when field value changes

(1) ShareShare
ReportReport
Posted on by 41

I have an Excel document with a list of different columns (client, value, policy no) in a format like;

 

ClientValuePolicy No
Client A£50A1
Client A£80A2
Client B£60B1
Client B£25B2
Client B£90B3
Client C£500C1

 

I would like to automate the process of having a word document for each client containing just the data related to them.

 

I have found a few different community forums about this topic but I cannot get any of them to work.

 

I have tried to follow this guide: https://www.bythedevs.com/post/how-to-populate-a-word-template-with-repeating-control

 

Which gets me most of the way, I can get separate documents but they all contain the full contents of the Excel spreadsheet, not just the rows related to 1 client.

 

Any help would be appreciated!

Categories:
  • Verified answer
    trice602 Profile Picture
    16,655 Super User 2026 Season 2 on at

    Hi @FDUN89 ,

     

    Here's a solution that does this except it doesn't write to a Word document (this one stops at creating a table and can be used to send to Word, send an email, other actions, etc).  Here's the entire flow to the step sending to Word which you said you already have working, just need to rows specific to Indvidual clients. 

     

    trice602_0-1691579756154.png

     

    The first apply to each gets all the emails (or clients in your case meaning this could be an account name) in an array and we are appending this variable with all clients from every row, including duplicate values.

     

    trice602_1-1691579913240.png

     

    Next you compose a union on your EmailList array and this removes duplicate values.  So in your case, you end up with an array variable of client names, emails, account numbers, etc - whatever you want.

     

    trice602_2-1691580054280.png

     

    The last step to get your unique rows for each client is to create a filter.  Here I am using the output of my client list from Compose Union and creating a filter array.  The "from" is the body of the excel step (list rows present in a table) where the current item (from the union) is equal to the email value in the excel worksheet - again could be anything you want, doesn't have to be an email.

     

    This is going to give a table of rows pertaining to an individual client.  In your case immediately below create html table, inside the same apply to each, you will want to plug in your Word actions so for each client you are getting their rows in excel and pasting into word, etc.

     

    Please mark as a solution if this is helpful!  I am using this flow in a handful of variations in production and never disappoints.  Always glad to help! Tom

     

    trice602_3-1691580159277.png

     

  • FDUN89 Profile Picture
    41 on at

    Got it working! Thank you

  • trice602 Profile Picture
    16,655 Super User 2026 Season 2 on at

    Nice!  Have a great day over there and feel free to tag me in future posts; I enjoy solving puzzles!  Always glad to help! Tom

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
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard