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 / Power Automate Desktop...
Power Automate
Answered

Power Automate Desktop Array of items in the List.

(0) ShareShare
ReportReport
Posted on by

I'm trying to create an excel file that contain this list, but the list contains numeric value below which is like array. 

 

deerzzxdell_0-1691480926685.png

 

What I want to do is put item [0] in column 'A' and item [1] in column 'B' of my excel file.

I have tried everything I could, but nothing works. If there's a simple way to do this, please explain in detail.

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Your variable is a list of lists. When you have something like that, I would suggest looping through this variable with a Loop action like this: 

    Agnius_0-1691493390634.png

    It will write each item of the list into a separate column starting from one. Since indexes are 0-based, I set the column index to be %LoopIndex+1%. Please note this will write at row 2 (assuming you have headers in row 1). But you might need to do something else there.

     

    Here's a snippet you can copy and paste into PAD directly to have those actions created for you:

    LOOP LoopIndex FROM 0 TO RMList.Count - 1 STEP 1
     Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: RMList[LoopIndex] Column: LoopIndex + 1 Row: 2
    END

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • deerzzxdell Profile Picture
    on at

    .

  • deerzzxdell Profile Picture
    on at

    deerzzxdell_0-1691549108145.png

    I mean if I want it to be like this in this case what should I do. Your solution works fine but it is the transpose of the result I want. 

     

    When I try to write this list into Excel only the first column appeared. For example [000000123, 000000234] only the first one is there. 

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Okay, It seems like I may have misunderstood your question. I thought you wanted to write each of those values into a separate column. But what it seems that you need is to write the values as separate rows instead. When that is the case, you actually need a bit more actions. You should try doing something like this:

    Agnius_0-1691554532847.png

     

    This will iterate through your %RMList% variable, creating a %CurrentItem% variable in each iteration. %CurrentItem% will be a list of its own, so there is another nested Loop action that will iterate through %CurrentItem% writing each value into a separate column. And then there is a Get first free row on column from Excel worksheet action to figure out which row to write to.

     

    Here's a snippet for copying and pasting it to PAD:

    LOOP FOREACH CurrentItem IN RMList
     Excel.GetFirstFreeRowOnColumn Instance: ExcelInstance Column: $'''A''' FirstFreeRowOnColumn=> FirstFreeRowOnColumn
     LOOP LoopIndex FROM 0 TO CurrentItem.Count - 1 STEP 1
     Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: CurrentItem[LoopIndex] Column: LoopIndex + 1 Row: FirstFreeRowOnColumn
     END
    END

    Try it and see if this works better for you.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard