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
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