cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
gemma
Level: Powered On

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
Delia_Laudoni
Level: Powered On

Re: Create Separate Excel Files Based on Field Value

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

gemma
Level: Powered On

Re: Create Separate Excel Files Based on Field Value

Thank you so much! 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,958)