Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / June 2004

Tip: Looking for answers? Try searching our database.

Import multiple excel files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Miri - 10 Jun 2004 15:53 GMT
Can anyone tell me how to import multiple files into an
Access 2000 db. I have over 100 files I need to import.  
Thanks.
Jim/Chris - 10 Jun 2004 18:06 GMT
I had to remove the ".xls" on the file names to use this.
Access doesn't like period in table names.  You might be
able to trim that off.  I hope this can help

This creates the tables with the same name as in the
directory C:\testimport\ without the ".xls"

Private Sub Command0_Click()
Dim filename As String
filename = Dir("c:\testimport\*.*")

Do Until filename = ""
DoCmd.TransferSpreadsheet acImport, 8, filename,
"c:\testimport\" & filename, True, ""
   filename = Dir
Loop
End Sub

>-----Original Message-----
>Can anyone tell me how to import multiple files into an
>Access 2000 db. I have over 100 files I need to import.  
>Thanks.
>.
Jim/Chris - 10 Jun 2004 19:41 GMT
I got it now without renaming the files

Private Sub Command0_Click()
Dim filename As String
filename = Dir("c:\testimport\*.*")

Do Until filename = ""
DoCmd.TransferSpreadsheet acImport, 8, Left(filename,
InStr(filename, ".") - 1),"c:\testimport\" & filename, True, ""
 filename = Dir
>Loop
>End Sub

I tested this and it works

Jim

>-----Original Message-----
>I had to remove the ".xls" on the file names to use this.
[quoted text clipped - 22 lines]
>>
>.
Miri - 10 Jun 2004 20:00 GMT
Thanks.  This is exactly what I needed.  What if I wanted
to import into the same table.

>-----Original Message-----
>I had to remove the ".xls" on the file names to use this.
[quoted text clipped - 22 lines]
>>
>.
Jim/Chris - 10 Jun 2004 20:13 GMT
This will import into the table named JIM.  If it doesn't
exist the first import will create it. I hope this will help.

This creates the tables with the same name as in the
directory C:\testimport\ without the ".xls" without the xls

Private Sub Command0_Click()
Dim filename As String
filename = Dir("c:\testimport\*.*")

Do Until filename = ""
DoCmd.TransferSpreadsheet acImport, 8, "JIM",
"c:\testimport\" & filename, True, ""
   filename = Dir
Loop
End Sub

Jim

>-----Original Message-----
>Thanks.  This is exactly what I needed.  What if I wanted
[quoted text clipped - 28 lines]
>>
>.
Miri - 10 Jun 2004 20:29 GMT
It worked perfectly.  Thanks so much.

>-----Original Message-----
>This will import into the table named JIM.  If it doesn't
[quoted text clipped - 50 lines]
>>
>.
Patrick - 13 Jun 2004 04:25 GMT
This is a function I would really like to use, however I can get it to work.  Is this a module I would create?  I know this is a beginner question so I may be in the wrong group.
Thanks for any help.

> It worked perfectly.  Thanks so much.
>
[quoted text clipped - 58 lines]
> >>
> >.
- 15 Jun 2004 22:17 GMT
Yes you would need to create a new module.
>-----Original Message-----
>This is a function I would really like to use, however I can get it to work.  Is this a module I would create?  I
know this is a beginner question so I may be in the wrong
group.
>Thanks for any help.
>
[quoted text clipped - 62 lines]
>>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.