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 / How you slice the arra...
Power Automate
Answered

How you slice the array in power automate desktop

(0) ShareShare
ReportReport
Posted on by 32

Hi, how do you guys slice the array in the power automate desktop? I have a data table coming from the web.

IamNadaa_1-1689948098846.png

 

 

And I only want to write the first 3 columns on my Excel sheet.

So I tried %dataTable[0-2]% just like how you slice an array in Python, but it's not working. 

I know the workaround here is to loop on that table, but I'm hoping there's an easy way around it. 

Thank you!

 

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

    The only way to do that is to create a new variable and add the values there, or loop through it and write each value to Excel separately.

     

    You could use Create new data table with less columns and then add rows to that table as %[DataRow[0], DataRow[1], DataRow[2]]% or, if you want to do it directly from the table variable, you need to provide a row index, too: %[DataTable[0][0], DataTable[0][1], DataTable[0][2]]%.

     

    I would, however, suggest that you simply modify your extraction, so you only extract relevant data and do not have the irrelevant value at all. This would allow you to avoid having an intermediary table created.

    -------------------------------------------------------------------------
    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.

  • IamNadaa Profile Picture
    32 on at

    The reason I extract the 4th column is because I'll be using that on the other action.

    I tried the solution you provide, but when I write it in Excel, it populates per row

    IamNadaa_1-1689950299401.png


    but what I want is to populate this per column

    IamNadaa_2-1689950330480.png

     

  • IamNadaa Profile Picture
    32 on at

    Oh, nvm. I think I will just extract the data twice, just like what you suggested! 

    Thank you so much!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard