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 Excel Table to M...
Power Automate
Unanswered

Split Excel Table to Multiple Excel Table

(0) ShareShare
ReportReport
Posted on by 12

Hello All, i need your support with solution for my case please,

i have Excel Table contains conditional format and there's a column for Markets.

Market

Ahmed_1_0-1705192519730.png

 

what i need is to create a flow to get this excel table from the share point and split it to two excel tables everyone belongs to their market and then get the table that belong to AL and put it as attachment and send it by mail and same to Market ES

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ahmed_1 

    According to your description, you want to split your excel file.

    First, we need to create a Template Excel Table file:

    vyueyunmsft_0-1705285237169.png

    This is my test flow:

    vyueyunmsft_1-1705285269451.png

    (1)The first four actions:

    vyueyunmsft_2-1705285355518.png

    (2)The Apply to each action:

    vyueyunmsft_3-1705285718096.png

    (3)The last action:

    vyueyunmsft_4-1705285737041.png

     

    The result is as follows:

    vyueyunmsft_5-1705285754576.png

    vyueyunmsft_6-1705285785259.png

     

     

    Best Regards,

    Yueyun Zhang

  • Ahmed_1 Profile Picture
    12 on at

    Hello @v-yueyun-msft ,

    regarding to table i put Table1 as a custom value because it didnt show to me any table and regarding to row i put current items for second apply to each not the first one , is it correct?

    Ahmed_1_0-1705329028501.png

    and which current item i'll put here ? is it for first apply to each or the second apply to each

    Ahmed_1_1-1705329532539.png

     

  • Ahmed_1 Profile Picture
    12 on at

    Hello @v-yueyun-msft 

    moreover there is an error say "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'For_each' referenced by 'inputs' in action 'Select_2' are not defined in the template.'.'."

    noting that my flow as below

    Ahmed_1_15-1705335424850.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ahmed_1 

    Thanks for your quick response! Yes the Table1 is a custom value . And this is the Table Name in your Template file.

    vyueyunmsft_0-1705375803765.jpeg

     

    Yes, you are right, in "Add a row in a present table" is used to the : 

    items('Apply_to_each_2')

     

     

    And  According to your error code "'The repetition action(s) 'For_each' referenced by 'inputs' in action 'Select_2' are not defined in the template.'.'."" . What's your put in your action 'Select_2':

    vyueyunmsft_1-1705376070472.png

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

     

  • Ahmed_1 Profile Picture
    12 on at

    Hello @v-yueyun-msft,

    thanks for your time

    here is the input of Select 2

    Ahmed_1_0-1705395544443.png

    noting that the body from filter array

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ahmed_1 

    Thanks for your response!Which you put in the Select_2 action:

    vyueyunmsft_0-1705397382507.png

    Can you show me your Peek code in Select_2 action: like this:

    vyueyunmsft_1-1705397608674.png

     

    vyueyunmsft_0-1705397586829.png

    Here need to use the Expression:

    item()?['Field Name']

    vyueyunmsft_0-1705397971703.png

     

    And you can test the flow step by step to test which action has the error. I will OOF today , if you still have the issue , i will reply you tomorrow as soon as possible.

     

     

    Best Regards,

    Yueyun Zhang

     

  • Ahmed_1 Profile Picture
    12 on at

    Hello @v-yueyun-msft ,

    sorry for bothering you but i've got another error Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Append_to_array_variable' at line '1 and column '4738' is invalid. Action 'Apply_to_each_2' must be a parent 'foreach' scope of action 'Append_to_array_variable' to be referenced by 'repeatItems' or 'items' functions.'.'.

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ahmed_1 

    Thanks so much for your response!😀

    Can you check which action return error in your side ?According to your error code , you need to check the "Append_to_array_variable" action use this code:
    items('Apply_to_each')

     

    vyueyunmsft_0-1705459164869.png

     

    Oh! I found this is my mistake 😱 , you need to modify the code :

    vyueyunmsft_1-1705459482652.png

    items('Apply to each Action Name')

    instead of the items()?['xxxxxxxx']

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

  • Ahmed_1 Profile Picture
    12 on at

    Hello @v-yueyun-msft ,

     

    the problem solved but i've got a new error 

    Ahmed_1_0-1705481843673.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ahmed_1 

    This error code seems it is a new designer issue. Can you use the directly expression in your Select_2 :

    body('Filter_array')

     

    vyueyunmsft_0-1705482571884.png

     

     

    Best Regards,

    Yueyun Zhang

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard