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 / Problem: Loop for each...
Power Automate
Unanswered

Problem: Loop for each Tab in Web page does not Save Tab Name in Excel File Name

(0) ShareShare
ReportReport
Posted on by

Scenario: I have web page http://GorillasRHungry.com. On web page, there are tabs named for different type of bananas with tables of data describing, whatever (*important - tabs change everyday dynamically in number and type of bananas). I start a new flow → launched new iteration of  chrome browser with web page → extracted data from web page as the tab names dataset and saved as ExcelInstance → get first free row/column from ExcelInstance → read from Excel worksheet (ExcelInstance) to get range of list and store in ExcelData (I followed concept presented on Looping Over Values In Power Automate Desktop by Desktop Data Crunching). I then created a for each Loop with CurrentItem focused from ExcelData. At first, I did message box which presented each individual name, and I ran the flow successfully, as a test. Check√. Next, I followed How to create dynamic UI selector in Microsoft Power Automate Desktop by RPAChampion. I added a Loop with a 0 to 10 with a step 1 as a LoopIndex. Next, within the Loop, I record a flow action that clicked the tab (class: <li>, id=tablist_1) (*Important - I replaced under Selector of Ui element "li" the number in parenthesis with %CurrentItem%) , clicked the save as Excel file button (Class: <a>, id=dt-button), then it expanded the various tree nodes to get to the desired folder. Within the edit file name box, I hard coded the first part as c:\users\me\Gorillas\Eat\<tab name>.xlsx.→ Save button → Yes button. Then various error handlers to assist the flow in finishing the loop, and closing the flow.  Wooosh!! After all that, my problem is the  flow, when activated, loops through the tasks successfully, but now, the Save As file name stays on the name from the first tab. I have tried to be as descriptive as possible. Any help on resolving my file name issue would be most graciously appreciated!

I have the same question (0)

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 312 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 154 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 143 Super User 2026 Season 2

Last 30 days Overall leaderboard