웹 사이트의 데이터를 ms 액세스 데이터베이스로 가져 오기위한 가져 오기 기능을 작성하고 싶습니다. 원본 데이터는 mysql 데이터베이스에 저장되며 원격 텍스트 파일 (csv)을 통해 사용할 수 있습니다. 그래서 내가 원한 것은이 원격 파일에 액세스하여 vba에서 읽는 것입니다. 내가 사용하는 코드는 아래에 있지만 참조가 누락 된 것 같습니다. ActiveXperts.Http 참조가 필요한 참조를 모릅니다. 아무도 도와 줄 수 있니?MS Access의 웹 사이트에서 데이터 가져 오기
들으 스티브
Dim objHttp
Dim strUrl
Dim strData
' Create a HTTP instance
Set objHttp = CreateObject("ActiveXperts.Http")
' Write some information to console
MsgBox "ActiveSocket " & objHttp.Version & " demo."
MsgBox "Expiration date: " & objHttp.ExpirationDate & vbCrLf
Do
strUrl = InputBox("Enter a URL", "Input", "www.activexperts.com/products")
Loop Until strUrl <> ""
objHttp.LogFile = "C:\HttpLog.txt"
objHttp.Connect (strUrl)
If (objHttp.LastError <> 0) Then
MsgBox "Error " & objHttp.LastError & ": " & objHttp.GetErrorDescription(objHttp.LastError)
Else
strData = objHttp.ReadData
If (objHttp.LastError <> 0) Then
MsgBox "Error " & objHttp.LastError & ": " & objHttp.GetErrorDescription(objHttp.LastError)
Else
MsgBox strData
End If
objHttp.Disconnect
MsgBox "Disconnect."
End If
MsgBox "Ready."
는 당신이 ActiveXperts.Http를 사용하여 설정되어 또는 다른 개체의 사용을 고려까요? – HK1