Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / September 2007

Tip: Looking for answers? Try searching our database.

Parse data from HTML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paco - 28 Sep 2007 00:32 GMT
I  have this code to import comma delimited data from a website. This code
gets the data and I can display it in a message box , but I can't figure out
how to get the data (from ResponseText) into a table. Any ideas?

Thanks. Paco

   Dim objHttp As Object
   Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
   Call objHttp.Open("GET", "URL", False)
   Call objHttp.send("")
   Call MsgBox(objHttp.ResponseText)
Pieter Wijnen - 28 Sep 2007 02:09 GMT
not familiar with MSXML2.ServerXMLHTTP
but you can assign the text to a string variable & write it to a local file
using
open "C:\MyFile.txt" For Output As 1
print #1, txt
close #1

then use docmd.transfertext

hth

Pieter

>I  have this code to import comma delimited data from a website. This code
> gets the data and I can display it in a message box , but I can't figure
[quoted text clipped - 8 lines]
>    Call objHttp.send("")
>    Call MsgBox(objHttp.ResponseText)
Paco - 28 Sep 2007 15:08 GMT
With some other code, that's what I am doing now (saving a file and then
using TransferText). I'm trying to avoid creating a file. If ResponseText can
be displayed in a message box, it seems like there should be a way to parse
it and import it into a table directly.

> not familiar with MSXML2.ServerXMLHTTP
> but you can assign the text to a string variable & write it to a local file
[quoted text clipped - 21 lines]
> >    Call objHttp.send("")
> >    Call MsgBox(objHttp.ResponseText)
Pieter Wijnen - 28 Sep 2007 20:02 GMT
offcourse
but you'd have to program it all by yourself AFAIK & AFAI i've experienced

Pieter

> With some other code, that's what I am doing now (saving a file and then
> using TransferText). I'm trying to avoid creating a file. If ResponseText
[quoted text clipped - 31 lines]
>> >    Call objHttp.send("")
>> >    Call MsgBox(objHttp.ResponseText)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.