Download file from web

raviroyalnew

New Member
Joined
Apr 23, 2018
Messages
4
Hello, could you help me in below code, i want to download xls file but did not get any option.

Application.StatusBar = "Saving - Dashboard.xlsx" Set InputElement = doc.querySelector("span.export[class='export excel'")

If Not InputElement Is Nothing Then

InputElement.Click
I am running this code every hour, I can't click save as button every hour.

I was thinking to download auto downloader, but did not get much success. Coz, I have have admin right and out of policy.

Public Sub OpenIE_Login()

Set IE = New InternetExplorer

IE.Visible = True

IE.Navigate cURL



Do While IE.readyState <> READYSTATE_COMPLETE Or IE.Busy: DoEvents: Loop ''' ATTENTION - PAUSE HERE


Set doc = IE.Document



Set LoginForm = doc.forms(0)

Set InputElement = doc.querySelector("input#userName[id='userName']")

If Not InputElement Is Nothing Then
InputElement.Value = cUsername
End If
'

Set InputElement = doc.querySelector("input.field[type='password']")

If Not InputElement Is Nothing Then
InputElement.Value = cPassword
End If

Application.StatusBar = "Saving - WokingHours.xlsx"
Set InputElement = doc.querySelector("span.export[class='export excel'") 'Dim TempStr As String If Not InputElement Is Nothing Then 'TempStr = InputElement.Value InputElement.Click

End Sub
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top