I'm trying to data scrape the main fundamentals table in finviz using
Public Sub TestRequest()
Dim Html As HTMLDocument, htable As HTMLTable
Set Html = New HTMLDocument
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", "https://finviz.com/quote.ashx?t=AAPL", False
.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"
.send
Html.body.innerHTML = .responseText
End With
Sheets("Temp").Cells.ClearContents
Sheets("Temp").Cells(1, 1) = Html.getElementsByClassName("snapshot-table2")(0).innerText
However, the entire table data gets dumped into a single cell in Excel. How do I turn the data into a neat table?