Importing from Excel using a connection string?

M

Maury Markowitz

I have a non-encrypted XLS file I need to import in a Access script
(there's some processing needed). I'm pretty handy with using
connection strings to import text files, and, if possible, I'd like to
go that route here too.

One thing has me stumped from the start though. The examples I've
found all require both the default path AND the exact filename to be
included in the connection string. In this case, the file name changes
every day. Is there a way to define the "Dbq" parameter in the SELECT
or ADODB Open statement?

Here's the example I found...

Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:
\MyExcel.xls;DefaultDir=c:\mypath;
 

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