Showing results for 
Search instead for 
Did you mean: 
New Member

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

Scenario: I have web page 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!


Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,969)