dao.recordset select from xls file

supmktg

Registered User.
Local time
Today, 17:04
Joined
Mar 25, 2002
Messages
360
I would like to be able to create a dao.recordset from a .xls file, and also a .dbf file.

I use the following code to create a dao.recordset from a .csv or .txt file:

Code:
Dim sql as string
Dim rst as DAO.Recorset

sql = "Select * FROM [Text;;FMT=Delimited;HDR=YES;IMEX=2;DATABASE=C:\Documents and Settings\Owner\Desktop\].[DataIn.CSV]"

Set rst = CurrentDb.OpenRecordset(sql)

Can someone tell me how I would change this code to do the same for an .xls, .xlsx or .dbf file?

Thanks,
Sup
 

Users who are viewing this thread

Back
Top Bottom