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 / For each row in Excel ...
Power Automate
Answered

For each row in Excel in JavaScript

(0) ShareShare
ReportReport
Posted on by 66

Hi all,

 

I am new to trying to use JavaScript in Desktop. I already read an excel file and have it in a 'datatable'. How do get a 'for each' in Javascript and execute an action for each row in the datatable, all in JavaScript?

 

 

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @Dion_tw 

    Not sure why exactly are you trying to do that when you can use the PAD's "For each" action to loop on the datatable. Maybe performance for thousands of rows?

    I do not think if we can use the PAD's datatable variable and loop it within a javascript.

    But since you are already using Excel, you can also use javascript to loop within the Excel rows directly.

     

    Here is a direct link to the post where I have shared the javascript code.

     

     

  • Dion_tw Profile Picture
    66 on at

    Thanks! that helps a lot. Yes, its because of performance, JavaScript is always faster. Also because i can go from 20 to 1 action now:)

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 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard