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)
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)