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 Automate
Answered

Datatable Slicing

(0) ShareShare
ReportReport
Posted on by 20

I have a datatable that has two columns.

 

How do I slice the second only to write to an Excel worksheet?

 

I tried

%DataTable[:][1]%

but this returned the second row!

 

I thought that the datatable was addressable like Python dataframes

  • Verified answer
    fraenK Profile Picture
    2,125 on at

    PAD only knows data table and data row, not columns, so you can loop through the rows of a column by %DatatableVariableName[i]['ColumnName']% or just get a column as a list:

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/variables#retrievedatatablecolumnintolist

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-types

     

  • lazy Profile Picture
    20 on at

    Awesome!

    Set variable to %DataTable[1]% worked

    Retrieve data table column into list action also works!

  • lazy Profile Picture
    20 on at

    Good to know that slicing by rows works though, e.g., %DataTable[3:]% returns all rows from the fourth!💡

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard