cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spsn
Helper I
Helper I

Automate download multiple excel reports from web

Hi There,

 

I want to automate my web report extraction. I've scheduled the reports to be generated. However, due to size they're listed as a link. They have export button on the side that we can click directly without going to the report (which require more wait time, looks like below).

My question is, how to tell Power Automate that it has to click every single Excel export button on that screen? Do I need to have 20 different UI Element of Export buttons?

I tried to capture the more traditional way where I click the report link and export the report from there. But there're 20 links, does it mean I have to capture all the links as 20 UI Elements? I notice that I can capture the text of the links as 'Output Data' variable, but I'm not sure how to link to match the Output Data with my report list (I copy the list of the report names into excel) and tell Power Automate to click the links one by one.

spsn_0-1628020151786.png

 

Thanks.

7 REPLIES 7
MichaelAnnis
Super User
Super User

Is tab an option?  I do something similar where I download all client statements 1 by 1 and it looks almost exactly like this.  

 

So, when I get to this page, I send 27 tabs to get to the first one, press Enter, it goes through the process of saving the file, then when it gets back to this page, I have a loop where it tabs again however many times I need to get to the next one, presses Enter, saves the file.  When it gets to the end, a different screen pops up, and I have used a selector from that screen to tell the loop to stop running.

The separate tab only comes after I click that Export button, and from there I cannot use web automation. I'm thinking a loop as well, but how to make a loop of 20 same Export button (all looks the same, but I suspect power automate will register it as button 1 2 3 4...)?

No, when I say tab, I mean "Send Keys" {Tab} (however many {Tab}s you need to select the export button, then using "Send Keys" {Return}, then going through the save process.  Then refocusing the web browser window {Tab} to the next export button, {Return}, go through the save process...until you've downloaded all reports.

Unfortunately no :(. The way the website is designed is to have user to click one by one, not by clicking the same button and many tabs appear afterwards. If I can do that, then it's easy, I just have to use desktop recorder and loop the process until no more tabs :).

Sorry.  I don't think I am explaining this right.  Go to a webpage, any web page, and start pressing the "Tab" button on your keyboard.  You will see a dotted box start to move around your screen.  This is a non-mouse selector box that you can then Press Enter, and that will select the link where the dotted box is located.  You should be able to use this method to Press the Tab Key to get the dotted box around the little icon, and then Press Enter to select the icon.

Magpie_Rob
Frequent Visitor

Hi @spsn , I had a similar issue which someone resolved on the message linked.
Solved: Re: click download link in Dynamic table - Power Platform Community (microsoft.com)

It uses a JS solution to count row numbers and then use it to loop each row in the table a click on it. 

this worked a treat for me and I was able to replicate the JS script to other sites (I have zero experience with JS)

 

Good Luck! 

Rob 

@Magpie_Rob Thanks for this. I'll need some time to understand what's going on (am not a developer, but need to automate to make my work less... manual) and try to apply to my case :).

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Top Solution Authors
Top Kudoed Authors
Users online (2,569)