Load data from Internet to Access

  • Thread starter Thread starter ghh
  • Start date Start date
G

ghh

Guest
tab formatted data?

The example data appears to be tab formatted with "," as the decimal separator.

Which version of Access are you using? HTML handling improves with later versions, I believe, but I am stuck with Access 97.

Are you trying to import a text file or drive a PHP script to create the text file and them import the text?
 
am I on the right track?

I am using Access 2002. I have figured it out, by using SaveToFile method in the Stream object, and then copy the data in the file to my table in Access:

Dim myRec As New ADODB.Record
Call myRec.Open("2004_03.txt", "URL=http://80.232.29.234/internett/kraftpriser/raadata/stdvar/", adModeRead)

Dim myStream As New ADODB.Stream
Call myStream.Open(myRec, adModeRead, adOpenStreamFromRecord)

myStream.Charset = "ascii"

myStream.SaveToFile "location of the file locally\test.txt", adSaveCreateNotExist

DoCmd.TransferText acImportDelim, "a transfer design, use macro to generate VBA", "tblMyTableInAccess", "locaion of the file locally\test.txt", True
 
Last edited:

Users who are viewing this thread

Back
Top Bottom