Multiple Imports from Excel (1 Viewer)

G

gbeck1964

Guest
This might seem like a stupid question but here it goes. Is it possible to import multiple excel spreadsheets into the same table either one at a time or even all at once?
 

Roni Sutton

Registered User.
Local time
Today, 18:47
Joined
Oct 18, 1999
Messages
68
If the spreadsheets are all in the same format, you can set up a saved import format when you import the first one and then just use that format to import the rest of them one at a time. That way, you don't have to re-define the columns, field names etc for each one. Is that what you are talking about?
 
G

gbeck1964

Guest
Importing Shreadsheets

Yes this is what I am talking about, but I know how to import one at a time. I want to know if it is possible to import more then one at a time.
 

Roni Sutton

Registered User.
Local time
Today, 18:47
Joined
Oct 18, 1999
Messages
68
As long as they are the same format you could do it with code. Create a form. Create a button on the form. In the event "On Click" of the button put the following line of code:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tblName", "filename"

for each spreadsheet you want to import, you will need this line with the file path and name in quotes. I have never played with this import, I usually import in text. You may need to read up on the TrasferSpreadsheet method. Once you get it working, just use it for each spreadsheet.

If this is going to be some sort of automated thing and you want the user to enter the spreadsheet name, you can use a variable instead of putting the file name in quotes. Hope this helps.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:47
Joined
Feb 28, 2001
Messages
27,272
Some folks in this forum have reported problems with importing anything other than Sheet 1 of a particular workbook. If this problem applies to you, you might wish to search the forum articles for keyword "worksheet"
 

Users who are viewing this thread

Top Bottom