dbTalk Databases Forums  

Import web based CSV file from web

comp.databases.ms-access comp.databases.ms-access


Discuss Import web based CSV file from web in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JackonLI
 
Posts: n/a

Default Import web based CSV file from web - 04-24-2011 , 07:57 PM






I need to import a CSV file through a url directly into Access 2007. I
can import into Excel then import the excel file into Access, but
can't figure out how to do it directly from Access. Is it even
possible?

Thanks for any help,
JackonLI

Reply With Quote
  #2  
Old   
Benny Andersen
 
Posts: n/a

Default Re: Import web based CSV file from web - 04-27-2011 , 12:57 PM






JackonLI wrote:
Quote:
I need to import a CSV file through a url directly into Access 2007. I
can import into Excel then import the excel file into Access, but
can't figure out how to do it directly from Access. Is it even
possible?
It's easy to google when you know the words - from 'vba http GET' -
first hit:
Sub testwget()
Dim objHttp As Object
Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
objHttp.Open "GET", "http://google.com/", False
objHttp.send ""
MsgBox objHttp.responseText
End Sub

Finaly, the responseText is to bee insertet in table - here there is the
choice between saving as file an import using docmd.transfertext or
looping over lines and executing sql insert statements.

Reply With Quote
  #3  
Old   
PW
 
Posts: n/a

Default Re: Import web based CSV file from web - 04-28-2011 , 03:25 PM



On Wed, 27 Apr 2011 19:57:18 +0200, Benny Andersen
<a.mail.user (AT) gmail (DOT) com> wrote:

Quote:
JackonLI wrote:
I need to import a CSV file through a url directly into Access 2007. I
can import into Excel then import the excel file into Access, but
can't figure out how to do it directly from Access. Is it even
possible?
It's easy to google when you know the words - from 'vba http GET' -
first hit:
Sub testwget()
Dim objHttp As Object
Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
objHttp.Open "GET", "http://google.com/", False
objHttp.send ""
MsgBox objHttp.responseText
End Sub

Finaly, the responseText is to bee insertet in table - here there is the
choice between saving as file an import using docmd.transfertext or
looping over lines and executing sql insert statements.

I don't understand what this is actually doing. Where is the file the
code is retrieving?

-paulw

Reply With Quote
  #4  
Old   
Tony Toews
 
Posts: n/a

Default Re: Import web based CSV file from web - 05-01-2011 , 05:56 PM



On Thu, 28 Apr 2011 14:25:16 -0600, PW
<emailaddyinsig (AT) ifIremember (DOT) com> wrote:

Quote:
objHttp.Open "GET", "http://google.com/", False

I don't understand what this is actually doing. Where is the file the
code is retrieving?
Replace google.com with the complete URL to the file.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #5  
Old   
PW
 
Posts: n/a

Default Re: Import web based CSV file from web - 05-01-2011 , 06:31 PM



On Sun, 01 May 2011 16:56:18 -0600, Tony Toews
<ttoews (AT) telusplanet (DOT) net> wrote:

Quote:
On Thu, 28 Apr 2011 14:25:16 -0600, PW
emailaddyinsig (AT) ifIremember (DOT) com> wrote:

objHttp.Open "GET", "http://google.com/", False

I don't understand what this is actually doing. Where is the file the
code is retrieving?

Replace google.com with the complete URL to the file.

Tony
Now I get it Tony :-) I may want to try this out. And put an updated
file back.

-paul

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.