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 / Create an array for ea...
Power Automate
Answered

Create an array for each Excel table column

(0) ShareShare
ReportReport
Posted on by 151

Hi all

I need to loop columns in a table of an Excel Online file stored on Sharepoint.
Each column needs to be saved to an array. Then that array needs to be appended to an array of arrays.

For example

FruitVegetablesAnimals
AppleLettuceCow
PearCarrotDog
BananaBroccoliCat


Result should be:

 

 

[
 [Apple, Pear, Banana],
 [Lettuce, Carrot, Broccoli], 
 [Cow, Dog, Cat]
]

 

 



It seems to be impossible unless I initialize an array variable for each column or do it in Office Script. I want to avoid the latter due to the Run Script daily call limitations. Is there a more dynamic solution within Power Automate someone has come up with?

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,985 Super User 2026 Season 1 on at

    Here is one approach to the problem. Starting with the following Excel file:

    ekarim2020_2-1632439881513.png

    This is the flow which reads the Excel file:

    2021-09-24_00-20-22.jpg

    ekarim2020_1-1632439762044.png

    Note the commas as used in the Compose Array action:

    ekarim2020_5-1632441585093.png

    Then finally looping through the array and reading the items:

    2021-09-24_08-34-09.jpg

    ekarim2020_0-1632469989160.png

     

    Ellis


    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Sakura Profile Picture
    151 on at

    Dear @ekarim2020  thank you so much for this thorough walkthrough! This works nicely. It is still an issue when the number of columns can change per file, but it's already a good help.

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 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard