how do you import xcell .csv into access

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
I need a script in vb or vbscript or other tool to load multiple .csv file
into a access database.
 
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
 
Back
Top