Import 10 tables form Excel at a time

G

Guest

I have a relational db one to many in Acces and I would like to import 10
tables at a tiime from excel. Fields in xls tables are same in Access tables.
Is that possible? How can I do this? Do I need code?

Many thanks for your help
 
J

John W. Vinson

I have a relational db one to many in Acces and I would like to import 10
tables at a tiime from excel. Fields in xls tables are same in Access tables.
Is that possible? How can I do this? Do I need code?

Many thanks for your help

You can use code, and it will probably be a good idea for ten imports
(especially if this is a repetitive operation). See the VBA help for
"TransferSpreadsheet".

To do it manually use File... Get External Data... import, and select Excel as
"files of type". You'll need to do each spreadsheet individually, though.

John W. Vinson [MVP]
 
G

Guest

Dear Jhon

I read what you suggest, nevertheless I have been tryin to import 3 tables
but I failed.
This is my situation. I have a Workbook named HOND12 with 3 sheets:
Sheet Com, Range to import "A1:D302",
Sheet AF Range to import "A1:C44" and
Sheet UT Range import "A1:E85".
I wrote the code
DoCmd.TransferSpreadsheet acImport, 3, _"Com", :MyDocuments\BDHond\Enc How
do I write here the name of the workbook and sheet's name, Tur, Range. I'm
neohyte in programming. Could help me?

Another question, can I export tables from Access by using
DoCmd.TransferSpreadsheet acExport, 3, _ etc to a sheets in a Workbook?

Many thanks for your help.
\
 

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