muhittinemmi
New Member
- Joined
- Jun 20, 2023
- Messages
- 19
Hello
I want to pull the data from the table in the specified site with the sample code below, but it only takes the 1st row of the table.
How should I change to get the whole table?
I want to pull the data from the table in the specified site with the sample code below, but it only takes the 1st row of the table.
How should I change to get the whole table?
VBA Code:
Sub QueryGoogleSheets()
Dim qt As QueryTable, url As String, key As String, gid As String
If ActiveSheet.QueryTables.Count > 0 Then ActiveSheet.QueryTables(1).Delete
ActiveSheet.Cells.Clear
url = "https://www.qnbfinansbank.com/kur-bilgileri"
Set qt = ActiveSheet.QueryTables.Add(Connection:="URL;" & url, _
Destination:=Range("a2"))
With qt
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.Refresh
End With
End Sub