how do you import xcell .csv into access

K

Ken Snell [MVP]

You don't give us much info, but start by looking at TransferText (macro or
VBA) to import text files. Then post back with more (much more) details
about what you want to do.
 
L

lamont

I have more than fifty xcell.csv files that are produce from a telephone
company phone bills. I nedd to set up a job to read all of these file and
load them into a access database table each day. From some of the reading I
have done on access, saids you can import xcell, txt, csv and other file type
into an access database. I nee a way to read m,ultiple file into the access
database from one file dirctory. I world think that a vb or vbscript would do
the job.
 
L

lamont

I need a script in vb or vbscript or other tool to load multiple .csv file
into a access database.
 
J

Joe Fallon

Here is an outline of what you need to do:

How to Import all Files in a Folder:

Private Sub btnImportAllFiles_Click()
'procedure to import all files in a directory and delete them.
'assumes they are all the correct format for an ASCII delimited import.
Dim strfile As String

ChDir ("c:\MyFiles")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferText acImportDelim, "ImportSpecName", "AccessTableName",
"c:\MyFiles\" & strfile, True
'delete the file (consider moving it to an Archive folder instead.)
Kill "c:\MyFiles\" & strfile
strfile = Dir
Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top