cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Create Separate Excel Files Based on Field Value

Hi everyone!

 

I'm just starting to get my feet wet with Microsoft Flow! It's exciting, but I need some advice! Can you seasoned Flow users offer a newbie some advice/point me in the right direction?

My goal is to read in an Excel file and split it into multiple Excel files based on the Location field. For my sample data below, I'd like to generate 3 files - one for Los Angeles, one for San Diego, and one for Santa Ana. 
Sample Data.PNG

 

 

 

 

 

 

So far, I've been able to use Filter Array for one city at a time, but how can I change this to dynamically filter for each city name? 

Here's my flow so far: 

Flow 1.PNG

 

 

 

 

Also, my Create File step generates a file, but I receive a "Couldn't Open the Workbook" message. How can I configure the Create File step to fix this issue? 

Flow 2.PNG

2 REPLIES 2
Helper I
Helper I

Hi, 

 

Maybe you could first create a variable (array type) where will be all your locations. For this you could list all the rows and loop thru them and add the location in the array if the location doesn't already exists.

 

And then you could basically loop thru your data again but now filtering using your variable, like this: for each variable, loop thru the excel rows, if variable value= location of the current row do something.

 

Hope this helps you 🙂

Delia

Thank you so much! 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (36,698)