#  Other Applications & Softwares  > Access Tables & Databases >  >  Import many excel files to many tables in one access database

## boss1982

hi all,

please i need your help; i want to import a lot of excel files to access, but i need each and every excel file to be imported in one table, excel file name = table name

i mean for example; if i imported 10 excel files (file names: 1,2,3,4,5,6,7,8,9,10), the result will be 10 tables in access (table names: 1,2,3,4,5,6,7,8,9,10).

i tried this one, but it is importing all files to one table which i don't want




```
Please Login or Register  to view this content.
```

----------


## alansidman

Take a look at Ken Snells web site.  He offers several suggestions of code on importing to Access.
http://www.accessmvp.com/kdsnell/EXCEL_Import.htm
Alan

----------


## Kyle123

As discussed in the other thread, this is probably a really bad idea

----------


## boss1982

hi

i checked the links and there are only the following methods;

1- Import Data from All Worksheets in a single EXCEL File into Separate Tables via TransferSpreadsheet (VBA)

2- Import Data from A Specific Worksheet in All EXCEL Files in a single Folder into Separate Tables via TransferSpreadsheet (VBA)

3- Import Data from All Worksheets in All EXCEL Files in a single Folder into Separate Tables via TransferSpreadsheet (VBA)

please note that i need same code like in second one of the above but without to select the sheet name, i need a code to select the first sheet in each files without mention the name of the sheet, just the first sheet in the excel files in the folder

thanks

----------


## davegugg

The problem is the third argument in the TransferSpreadsheet function.  Change it from "Table Name" to myfile.

----------

