cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SA_VOH
Helper III
Helper III

How to download Excel files from Website by selecting a date

Hi,

I am frequently using a URL and this is in public domain and there is no need to login. This URL is:-

https://wbes.nrldc.in/Report/STOANew

 

When i visit this URL, i would like to select a Date from Date Picker and this date shall be the yesterday one. Eg. today is 19-June-22 and i would like to select 18-June-22. Then i shall click "Show Data". This is shown by an image below:-

 

1st Image1st Image

After clicking "Show Data", i will get some tabulated data, which i can then save as Excel file or Csv or PDF. However i choose Excel only. This is shown in next image and numbered as 3 (Tabulated Data) shown on website and 4 (I choose Excel).

2nd Image2nd Image

These steps are repeated everyday. Although i have Organisational Account but no the premium one, can i automate these steps using PAD? Even automation to some extent will also be helpful

Please help.

4 ACCEPTED SOLUTIONS

Accepted Solutions
VJR
Super User
Super User

Hi @SA_VOH 

 

Yes that's absolutely possible and PAD or any RPA tool are used for such repetitive activities :).

 

I used the recorder and recorded the actions you mentioned above and was able to download the Excel file.

 

This is how the flow looks like, but you need to record it on your PAD editor so that you capture the UI elements.

For step #3, use previous day instead of the 18-6 hard coded I have used.

 

VJR_0-1655638607656.png

 

The file that got downloaded was this:

FullSchedule--STOA-Details-ALL-ALL-ALL(209)-18-06-2022.xlsx

 

So yes go ahead.

Don't wait. Just Automate :).

 

 

View solution in original post

Ankesh_49
Super User
Super User

Ankesh_49_0-1655658291996.png

@SA_VOH Use this action and pass your parameters to get current date - 1

Thanks
Ankesh

View solution in original post

VJR
Super User
Super User

If time is causing the issue get only the first 10 chars of the date

 

VJR_0-1655693087106.png

 

VJR_1-1655693123052.png

 

Give Wait actions wherever necessary.

View solution in original post

VJR
Super User
Super User

Every browser points to the same "Downloads" folder unless manually changed.

- Your file will be download there too

- Use Get files from folder. This has an option to sort by date time

- Once sorted, the topmost file will be the one that you just downloaded

- Now you can use Move files to move it to another folder

View solution in original post

10 REPLIES 10
VJR
Super User
Super User

Hi @SA_VOH 

 

Yes that's absolutely possible and PAD or any RPA tool are used for such repetitive activities :).

 

I used the recorder and recorded the actions you mentioned above and was able to download the Excel file.

 

This is how the flow looks like, but you need to record it on your PAD editor so that you capture the UI elements.

For step #3, use previous day instead of the 18-6 hard coded I have used.

 

VJR_0-1655638607656.png

 

The file that got downloaded was this:

FullSchedule--STOA-Details-ALL-ALL-ALL(209)-18-06-2022.xlsx

 

So yes go ahead.

Don't wait. Just Automate :).

 

 

SA_VOH
Helper III
Helper III

Hi VJR,

Thanks for the reply. But i am facing a issue in selecting a date (which will be Current date -1). Actually i got current date and Time, through Search Action, and selected date only. However, the moment i enter the variable "CurrentDate -1", it says the input text should be text and there is a mismatch.

The screenshot is enclosed:-

ImageImage

How can i solve this error. Further, is there any way from where i could specify the folder in which the downloaded Excel files will drop.

Regards,

Ankesh_49
Super User
Super User

Ankesh_49_0-1655658291996.png

@SA_VOH Use this action and pass your parameters to get current date - 1

Thanks
Ankesh

Dear Ankesh_49,

I tried the above method and i selected the "date" only from Currentdate and time. However, although no error is coming in the PAD, and the variables passed in date are ok, the execution is having a problem.

It takes the current date only and doesn't subtract it by 1. So date is 19-June-22 only. May be time is creating some issue, as the DatePicker is taking value i.e. 18-06-2022 00:00:00 and causing errorScreenshot 2022-06-19 230618.png

If this issue could be resolved then i would like to know how to store the downloaded files in a specific folder. As per my search, this can only be done if browser is Internet Explorer. Or if you could suggest something that's better.

Regards,

 

VJR
Super User
Super User

If time is causing the issue get only the first 10 chars of the date

 

VJR_0-1655693087106.png

 

VJR_1-1655693123052.png

 

Give Wait actions wherever necessary.

Ankesh_49
Super User
Super User

@SA_VOH Please try to use the logic suggested by @VJR .

"how to store the downloaded files in a specific folder" use files or folders action and explore it a bit. 

VJR
Super User
Super User

Every browser points to the same "Downloads" folder unless manually changed.

- Your file will be download there too

- Use Get files from folder. This has an option to sort by date time

- Once sorted, the topmost file will be the one that you just downloaded

- Now you can use Move files to move it to another folder

Hi VJR,

Thanks for resolving my issue. Now i will explore more of PAD. Just one more query.

If i say that i want this process to be unattended then i think i will have to Opt for Premium Subscription - to get the ability to run flows automatically. 

Or else everyday i have to go to PAD and select the flow and run the same.

I would also like to thank Ankesh_49 for providing help to resolve my issue.

Regards,

Ankesh_49
Super User
Super User

Thank you @SA_VOH . I am glad that it helped.

 

@SA_VOH For unattended mode,  subscription would be required.
However, if you want to give it a try:) You can make a schedule flow which will control other flows. Make endless loop to run other desktop flows. But after system restart, you need to kick off manually your schedule flow.

VJR
Super User
Super User

- As of now no option in PAD to schedule desktop flows. You will have to call it from a Cloud flow and schedule the cloud flow. Yes you would require the appropriate license for it.

  • You can upvote the idea here.

 

- Haven't tried it but saw a link here that talks about scheduling a desktop flow without a cloud flow.

 

- As a side note, not many know this but if you think @Ankesh_49's response has also helped you to achieve a solution then you can mark multiple posts as a solution on this same thread.

Helpful resources

Announcements
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 (2,149)