https://demo.istat.it/app/?i=D7B&l=it&a=2024
1) click on button: Vista Territoriale
2) click on radio button: Tutti i comuni della provincia selezionata (Seleziona la provincia)
3) click on Listbox mese Luglio
$) click on button Cerca
Appear a table with data.
I need to click on button Esporta in csv, and save the csv file in c:\test\
my test code:
Code: Select all
Dim IE As Object, P1 As Integer, P2 As Integer, I As Integer, TESTO As String
Dim URL As String, VALORE As String, STRINGA As String
Dim TB As HTMLTable
Dim TRO As HTMLTableRow
Dim TDC As HTMLTableCell
'Dim IE As Object
Dim oHDoc As HTMLDocument
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.navigate "https://demo.istat.it/app/?i=D7B&l=it&a=2024"
End With
While IE.readyState <> 4
DoEvents
Wend
Set oHDoc = IE.document
With oHDoc
.getElementById("tab-1").Click
.getElementById("provincerb-1").Click
.getElementById("btnricerca-1").Click
.getElementById("dt-button buttons-csv buttons-html5").Click[b]<<<< dont work[/b]
End With