Example of Programmatic Import of an Excel Worksheet to an Access Table

D

Don

What built-in functions should I be looking for to programmatically
imporrting an Excel worksheet into an Access (2003) table? There does not
seem to be an "import" function per se (or I missed it!). There was a
reference to an SQL string in a posting in
microsoft.public.access.externaldata. However, it was not clear how the
connection to the spreadsheet itself was made.

In short, my goal is to allow the user to pick the desired Excel file (.xls)
and then the program import the data into a table. The spreadsheet is
relatively simple having one worksheet and is fixed format (i.e. the columns
do not vary from instance to instance).

Any suggestions will be greatly appreciated!

Thanks!

Don
 
D

Don

Rob,

Exactly the hints I needed!! Especially the TransferSpreadsheet function!
Don't know how I missed that!

Is there any advantage to using the APIs as described at
http://www.mvps.org/access/api/api0001.htm as opposed to Common Dialog
control? I have used the Common Dialog control in the past.

Thanks!!

Don
 
R

Rob Oldfield

Yes. You're better off using the api method. The common dialog control is
buggy and quite frequently fails due to references going wrong.
 
D

Don

Rob,

Thanks for the advice!

Don





Rob Oldfield said:
Yes. You're better off using the api method. The common dialog control is
buggy and quite frequently fails due to references going wrong.
 

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