[AccessD] Excel file in Access

Dale Kalsow dkalsow at yahoo.com
Mon Feb 7 15:06:09 CST 2005


It is a chart in excel that I want to display.  So it would be nice if I could just open the excel page in access.  Just reading the data will not work.
 
Any other good ideas?
 
Thanks!
 
Dale

MartyConnelly <martyconnelly at shaw.ca> wrote:
You could use this type of recordset for your report

Dim oConn As New ADODB.Connection
Dim oRS As New ADODB.Recordset
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Book1.xls;" & _
"Extended Properties=""Excel 8.0;"""

' Use a range with a specific address (for example, [Sheet1$A1:B10]).
' Use the sheet name followed by a dollar sign (for example, [Sheet1$] 
or [My Worksheet$]).
oRS.Open "Select * from [Sheet1$A1:B10]", oConn, adOpenStatic


oConn.Close


Dale Kalsow wrote:

>Good Afternoon,
> 
>I have an excel document that I need to take tabs or a range of cells from and include them in an access report. I am using office 2003.
> 
>Does any one know how to do this?
> 
>Thanks!
> 
>Dale
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
> 
>

-- 
Marty Connelly
Victoria, B.C.
Canada



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

		
---------------------------------
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'


More information about the AccessD mailing list