Hello everyone,
I found a code that works well, but I want to modify it.
I don't need the source code. I want Inspect Element (CTRL+SHIFT+C) to Excel.
Is it possible?
Thanks for helping!
I found a code that works well, but I want to modify it.
VBA Code:
' Fetch Entire Source Code
Private Sub HTML_VBA_Excel()
Dim oXMLHTTP As Object
Dim sPageHTML As String
Dim sURL As String
'Change the URL before executing the code
sURL = "http://www.google.com"
'Extract data from website to Excel using VBA
Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
oXMLHTTP.Open "GET", sURL, False
oXMLHTTP.send
sPageHTML = oXMLHTTP.responseText
'Get webpage data into Excel
' If longer sourcecode mean, you need to save to a external text file or somewhere,
' since excel cell have some limits on storing max characters
ThisWorkbook.Sheets(1).Cells(1, 1) = sPageHTML
MsgBox "XMLHTML Fetch Completed"
End Sub
I don't need the source code. I want Inspect Element (CTRL+SHIFT+C) to Excel.
Is it possible?
Thanks for helping!