ASP, ODBC and Excel

Results 1 to 2 of 2

Thread: ASP, ODBC and Excel

  1. #1
    Join Date
    Dec 1969

    Default ASP, ODBC and Excel

    Hi<BR><BR>I am trying to read an Excel file from an asp page in order to generate a database from the excel data.<BR><BR>The code i used is :<BR><BR>Set Excel = Server.CreateObject("ADODB.Connection")<BR> Path = Server.Mappath("/") & "clean2000.xls"<BR> Excel.Open "DBQ=" & Path & ";Driver={Microsoft Excel Driver (*.xls)};"<BR> <BR> <BR> Set rsContent = Server.CreateObject("ADODB.RecordSet")<BR> SQLstr = "SELECT * FROM sheet1"<BR> rsContent.Open SQLstr, Excel, 1, 3<BR><BR>But this fails with this error:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e21&#039 <BR><BR>The request properties can not be supported by this ODBC Driver. <BR><BR>/test.asp, line 9 <BR><BR>Does anyone know how to connect to a Excel file<BR>Cheers John

  2. #2
    Join Date
    Dec 1969

    Default Try this link - works for Excel 97 & 2000

    Try this link:<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts