• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

import to excel from web

graha_karya

New Member
why cannot import table from this site
Code:
"https://www.youtube.com/results?search_query=" & WorksheetFunction.EncodeURL(SearchText)
Code:
Option Explicit

Sub SaveHTMFile(iHTMLString As String)

    Dim fso As New Scripting.FileSystemObject
    Dim ts As Scripting.TextStream
   
    Set ts = fso.CreateTextFile( _
        Environ("UserProfile") & "\Desktop\Request Output.htm", _
        True, _
        True)
       
    ts.Write HTMLString
   
    ts.Close
   
End Sub

Sub BasicGETRequest()

    Dim req As New MSXML2.XMLHTTP60
    Dim reqURL As String
   
    reqURL = "https://sirup.lkpp.go.id/sirup/ro/penyedia/satker/59885"
   
    req.Open "GET", reqURL, False
   
    req.Send
   
    If req.Status <> 200 Then
        MsgBox req.Status & " - " & req.statusText
        Exit Sub
    End If
   
    'Debug.Print req.responseText
    'ParseWiseOwlVideos req.responseText
    SaveHTMFile req.responseText
   
End Sub
 
Last edited by a moderator:
Top