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

Automate Excel to Word creating new file when field value changes

(0) ShareShare
ReportReport
Posted on by 37

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:
I have the same question (0)
  • Verified answer
    trice602 Profile Picture
    15,404 Super User 2025 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
    37 on at

    Got it working! Thank you

  • trice602 Profile Picture
    15,404 Super User 2025 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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard