hello
I try getting information from website should brings table contains values as show when open the website. sorry the website is arabic not english but the idea just brings table contains values . the code doesn't brings any thing and there is no error . I hope to find some help here.
Sub GetSoccerStats()
Dim xmlReq As New MSXML2.XMLHTTP60
Dim objDoc As New MSHTML.HTMLDocument
Dim objTable As MSHTML.htmlTable
Dim objTableRow As MSHTML.htmlTableRow
Dim strURL As String
Dim strResp As String
Dim strText As String
Dim rw As Long
Dim ws As Worksheet
strURL = "https://www.saudiexchange.sa/wps/portal/tadawul/market-participants/issuers/issuers-directory/company-details/!ut/p/z1/04_Sj9CPykssy0xPLMnMz0vMAfIjo8zi_Tx8nD0MLIy83V1DjA0czVx8nYP8PI0MDAz0I4EKzBEKDEJDLYEKjJ0DA11MjQzcTfW99KPSc_KTIGZllJQUWKkaqBqUJKYklpfmqBroRyXn5xYk5lUGV-Ym5QMVGRkYG-iHEzK1IDsop6zSUREAbm86Ww!!/#chart_tab2/"
With xmlReq
.Open "GET", strURL, False
.send
strResp = .responseText
End With
'Worksheets.Add
Set ws = sheet1
With ws
objDoc.body.innerHTML = strResp
Set objTable = objDoc.getElementsByClassName("dataTables_processing")(0)
If Not objTable Is Nothing Then
rw = 1
For Each objTableRow In objTable.Rows
strText = objTableRow.Cells(0).innerText
Cells(rw, "a").Value = objTableRow.Cells(0).innerText
rw = rw + 1
Next objTableRow
Columns("a").AutoFit
End If
End With
Set xmlReq = Nothing
Set objDoc = Nothing
Set objTable = Nothing
Set objTableRow = Nothing
End Sub