By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,802 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

using axcel data in an asp apge with ado

P: n/a
Hi

I am trying to connect to an excel file test.xls located in the same folder
than my asp page

with the following code:
36 Set cnnExcel = Server.CreateObject("ADODB.Connection")
37 cnnExcel.ActiveConnection = "DBQ=" & Server.MapPath("xl_data.xls") &
;DriverId=790;" & "DRIVER={Microsoft Excel Driver (*.xls)};"
cnnExcel.Open

I get the following error:

does anyone knows what to do?
this object doen't manage named arguments: 'ActiveConnection'
/ppl/fra/TMPoi9rs6uuak.Asp, line 37

thanks in advance
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
eric wrote:
Hi

I am trying to connect to an excel file test.xls located in the same
folder than my asp page

with the following code:
36 Set cnnExcel = Server.CreateObject("ADODB.Connection")
37 cnnExcel.ActiveConnection = "DBQ=" &
Server.MapPath("xl_data.xls") & ;DriverId=790;" & "DRIVER={Microsoft
Excel Driver (*.xls)};"
cnnExcel.Open

I get the following error:

does anyone knows what to do?
this object doen't manage named arguments: 'ActiveConnection'
/ppl/fra/TMPoi9rs6uuak.Asp, line 37

A Connection object does not have an ActiveConnection property. You should
be setting its ConnectionString property.
You can view the ADO documentation at msdn.microsoft.com/library - drill
down into the Data Access node in the TOC.

Additionally, instead of ODBC, you should use the Jet OLEDB provider:
http://www.able-consulting.com/MDAC/...orMicrosoftJet

Just scroll down to the section about opening an Excel file.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.