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 / Split one Excel file ...
Power Automate
Answered

Split one Excel file to more separate files based on values of a column

(1) ShareShare
ReportReport
Posted on by 2
Dear All,
 
I have an Excel file ("Source_file.xlsx"), which contains a table ("Source_table"). This file is in "Source_folder" folder on Sharepoint.
 
The first column of the table shows rows by sources. it would be the basis of classification.
 
Something like this:
  
 
  
Task would be the following, create new Excel files from all source group (in this example 3 new files) into a other folder ("Destination_folder").
 
All these files should be contain only the rows of one source group.
 
Structure of new files would be in this case:
 
 
 
 
 
Further details:
  
 
- Every time when the flow run, it should create new files. If older files are in Destination_folder, it can overwrite these.
 
- Names of new files should be based on source groups (in this case Source1.xlsx, Source2.xlsx and Source3.xlsx) 
 
- When a new source group will be added to rows of Source_table, it should create a new file for this group (Source4.xlsx) during the next run.
  
 
Is it possible to solve it in Power Automate?
 
 
Thank you! 
 
 
Categories:
I have the same question (0)
  • Verified answer
    Assisted by AI
    MarkRahn Profile Picture
    1,332 Super User 2026 Season 1 on at
     
    The answer is Yes. You should be able to do this with Power Automate.
     
    You will need to build and refine your Flow. Your best bet would be to start with Copilot to refine what you are looking for. Below is a Copilot reply based on the information you provided to get you started,
     
    You can do this in Power Automate using a dynamic grouping pattern so the flow automatically creates one Excel file per source group in your first column. The idea is to read the table once, figure out all the unique group names, and then generate a separate file for each one in your destination folder.

    Start by using “List rows present in a table” on your Source_table. Then add a Select action and map only the first column (the one that contains your group names). After that, add a Compose action with:

    union(body('Select'), body('Select'))

    That removes duplicates and gives you a clean list of unique group names. If a new group appears later, the flow will pick it up automatically.

    Next, add an Apply to each loop over the output of that union step. Inside the loop, use Filter array to filter the original List rows output down to only the rows where the first column equals the current group name from the loop. That gives you the subset of rows that belong in the new file.

    Then create a new Excel file in your destination folder and name it using the current group value. Since you want to overwrite files each run, you can just recreate them every time. After creating the file, add a table to it (Excel requires a table before you can insert rows). Once the table exists, loop through the filtered rows and insert them into the new file.

    This pattern will create one file per group, overwrite them each run, and automatically handle new groups without any changes to the flow.

     

    If you have specific questions as you build your flow, come back and post them to the forum.

     -Mark

  • trice602 Profile Picture
    15,905 Super User 2026 Season 1 on at
    Helpful!  Thanks for the response here Mark! Many thanks! 💯💯💯💯💯

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard