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 / Combine multiple ident...
Power Automate
Unanswered

Combine multiple identical tables from EXCEL file in order to export in a single CSV

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I'm discovering the powerful possibilities of Power Automate.

I'm trying to learn by myself with the help of the templates and tutorials on internet

Thanks to this community I resolved some problems. But since few days I block on a such simple request... 😓  

 

I have a single excel file with a dozen of identical tables on separate sheet (Same Headers but with different values)

I just want to keep the headers and to combine all the values in order to export the results in a CSV file. For instance :

 

TABLE A (SHEET 1)

PROJECTUSERNAMETYPELOGIN
WDapearceAGENT1000
WDclilleNOT-AGENT1001

 

TABLE B (SHEET 2)

PROJECTUSERNAMETYPELOGIN
DEajansenAGENT2000
DEmreedNOT-AGENT2002

 

RESULT in a CSV :

PROJECTUSERNAMETYPELOGIN
WDapearceAGENT1000
WDclilleNOT-AGENT1001
DEajansenAGENT2000
DEmreedNOT-AGENT2002

 

It seems so simple but I don't know yet how to do.

Thanks for your help.

 

Nico

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    See example below that will get what you are after.

     

    Note that my example uses an Excel file with three Tables.

    grantjenkins_0-1667864016618.png

    grantjenkins_2-1667864094052.png

    grantjenkins_3-1667864104154.png

     

    The full flow is below. I'll go into each of the actions.

    grantjenkins_4-1667864161193.png

     

    Get tables retrieves a list of all the Tables in your workbook.

    grantjenkins_5-1667864197094.png

     

    We then initialize an Array variable called rows that will eventually contain all the rows from each of the Tables.

    grantjenkins_6-1667864281470.png

     

    We then loop through each of the Tables and retrieve the rows.

    grantjenkins_7-1667864325018.png

     

    Next, we combine the current data in our Array variable rows with the rows we just received. The expression used here is:

     

    union(variables('rows'),outputs('List_rows_present_in_a_table')?['body/value'])

     

    grantjenkins_8-1667864421988.png

     

    We then set our Array variable rows to the combined rows.

    grantjenkins_9-1667864470338.png

     

    Finally, we can build our CSV table using the data from our Array variable rows.

    grantjenkins_10-1667864512171.png

     

    Note the expressions used for each value is:

     

    item()?['PROJECT']
    item()?['USERNAME']
    item()?['TYPE']
    item()?['LOGIN']

     

     

    The final output of our CSV would look like:

    grantjenkins_11-1667864668022.png

     

  • Community Power Platform Member Profile Picture
    on at

    Hi M Grant,

    Thank you so much for taking your time to help me.

    It works perfectly. 👌

    I was on the right path but never I'll had found the solution without your help (Especially for the expression).

    I'll link unanswered comparable topics to your solution.

    Thank you again.

  • Aswift2022_ Profile Picture
    30 on at

    Hi, I have a similar requirement, although my tables are in different workbooks, and I would like to create a table , not CSV - I am sure there’s a slight tweak from this example, but I can not figure it out, nor find the answer. Thank you in advance if you are able to help 

  • grantjenkins Profile Picture
    11,063 Moderator on at

    @Aswift2022_ Are you able to post a new question in the forum and you can ping me directly. The more info you have the better we can find a good solution.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard