Accessing Excel file in Access

R

Roger Elgin

Hi,

I am unable to connect to an excel file stored on the c: drive of my
computer in an access module using the CreateObject method.

I have also tried ADODB connection however, in this case the recordset does
not connect to the sheet1.

Please advise.

Thanks,
Roger
 
J

Joseph R. Pottschmidt

Dear Roger:

What you need to do is Reference MS Excel Reference Library into your
project. Then this way you can add the coding to be able to access MS
Excel in your MS Access application.

If you're just simply looking to link to the ms Excel sheet1, then you
can just use the ODBC connection that comes with MS Office to be able to
connect to MS Excel Workbook and link or import data from a worksheet.

Hope that helps,

Joe P.


-----Original Message-----
From: Roger Elgin [mailto:Roger [email protected]]
Posted At: Wednesday, June 14, 2006 3:51 AM
Posted To: microsoft.public.access.modulesdaovba.ado
Conversation: Accessing Excel file in Access
Subject: Accessing Excel file in Access

Hi,

I am unable to connect to an excel file stored on the c: drive of my
computer in an access module using the CreateObject method.

I have also tried ADODB connection however, in this case the recordset
does
not connect to the sheet1.

Please advise.

Thanks,
Roger
 
Top