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.