Connection to MS Excel

Results 1 to 2 of 2

Thread: Connection to MS Excel

  1. #1
    Join Date
    Dec 1969

    Default Connection to MS Excel

    I am using MS Excel 2002.I try to establish a connection to MS Excel but failed. can someone tell me what&#039;s wrong with the codes below:<BR><BR>Set cnnExcel = Server.CreateObject("ADODB.Connection")<BR>cnnExce l.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=dataSourcePath; Extended Properties=""Excel 8.0;"""<BR>

  2. #2
    Join Date
    Dec 1969

    Default I think it's because of...

    ...this:<BR><BR>cnnExcel.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=[hl="yellow"]dataSourcePath[/hl]; Extended Properties=""Excel 8.0;"""<BR><BR>You have to put in the path (and file name) to the Excel file. The path has to be the absolute path to the file on the server. See for an example.<BR><BR>Oliver.

Posting Permissions

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