Whisky
05-09-2017, 03:31 AM
Hi,
I know some basic VBA for working with data within Excerl but very little HTML.
I can successfully open a website/link from website from Excel using chrome browser via:
Sub Chrome_Test()
'Loads Page
Dim WebUrl As String
'
WebUrl = "https://analytics.***xx.******.com/#/metrics?interval=r&datesel=d30&zoom=day&measure=units&type=line&app=971703112"
End sub
where is ***xx is part of the website name (the site also requires Username and password to access but I have got chrome to remember it)
On the page there is a download button that downloads a CSV file when clicking on it. I would like to hit the download button or do the eqv to download the CSV file on local machine using the VBA code in Excel.
I have used the "inspect" command to view the page. And the following HTML code seems to relate to the download button:
<div ng-click="getData()" class="icon cicon-download"></div>
Does anyone know how I would execute this line in VBA?
Alternatively as a fall back option I could use send keys. In this case does anyone know what combination of keys would mimic clicking left mouse button? Ctrl D does not work.
Many thanks
Whisky
I know some basic VBA for working with data within Excerl but very little HTML.
I can successfully open a website/link from website from Excel using chrome browser via:
Sub Chrome_Test()
'Loads Page
Dim WebUrl As String
'
WebUrl = "https://analytics.***xx.******.com/#/metrics?interval=r&datesel=d30&zoom=day&measure=units&type=line&app=971703112"
End sub
where is ***xx is part of the website name (the site also requires Username and password to access but I have got chrome to remember it)
On the page there is a download button that downloads a CSV file when clicking on it. I would like to hit the download button or do the eqv to download the CSV file on local machine using the VBA code in Excel.
I have used the "inspect" command to view the page. And the following HTML code seems to relate to the download button:
<div ng-click="getData()" class="icon cicon-download"></div>
Does anyone know how I would execute this line in VBA?
Alternatively as a fall back option I could use send keys. In this case does anyone know what combination of keys would mimic clicking left mouse button? Ctrl D does not work.
Many thanks
Whisky