System.Data.OleDb.OleDbException: Could not find installable ISAM : Read Excel Spreadsheet in web-fo

Discussion in 'ASP .Net' started by Roger Twomey, Apr 27, 2004.

  1. Roger Twomey

    Roger Twomey Guest

    I have a form that allows a user to upload a microsoft Excel Spreadsheet. (I
    am testing with one created in Excel 2000)

    The spreadsheet is uploaded correctly.

    It is then supposed to be read and display in a datagrid. When the code
    executes I get:

    System.Data.OleDb.OleDbException: Could not find installable ISAM

    here is the snippet that is to read the excel file:

    <code>
    If bolContinue = True Then
    'Open the Excel file for import to the temp table in SQL
    server
    Dim strExcelConnector As String
    strExcelConnector = "Provider=Microsoft.Jet.OLEDB.4.0;
    DataSource=" + strFileName + "; Extended Properties=Excel 8.0;"
    Dim conExcel As New
    OleDb.OleDbConnection(strExcelConnector)
    Dim dsExcel As New DataSet
    Dim daExcel As New OleDb.OleDbDataAdapter("Select * from
    [Sheet1$]", conExcel)

    Try
    conExcel.Open()
    daExcel.Fill(dsExcel)

    DataGrid1.DataSource = dsExcel.Tables(0).DefaultView
    DataGrid1.DataBind()

    Catch ex As Exception
    Throw ex
    End Try

    daExcel = Nothing
    dsExcel = Nothing
    conExcel = Nothing

    End If

    </code>

    I know that the file name is correct. Beyond that... this is the first time
    I have ever attempted to open an Excel file without excel! ;)

    The file name is in the format "d:\wwwroot\inetpub\website\excel\excel.xls"

    Note: I found documentation on the web that indicated msexcl40.dll might not
    exist or could be in the wrong directory or not match the registry. I have
    checked this. The file exists, it is where it belongs and the registry
    matches reality.

    I have also been looking for permissions issues (in case that was it) but
    there are none.

    Any ideas?

    Thanks.
     
    Roger Twomey, Apr 27, 2004
    #1
    1. Advertising

  2. Roger Twomey

    Roger Twomey Guest

    In the words of that great Philosopher Homer Simpson... "DOH!"

    That was it!

    Thanks for your help!

    Of course now I am trying to figure out why the first row of data appears to
    be corrupt but the rest is fine.

    F1 F2 John Doe F5 fred@abc#com

    789789789 789789789 Frank Doe 7057431006
    123123123 123123123 Albert Doe 7057431006
    963963963 963963963 Johannus Doe 7057431006
    852852852 852852852 Jack Doe 7057431006
    741741741 741741741 Andrew Doe 7057431006


    (the empty row is legit.)

    F1, F2, F5, fred@abc#com

    are all invalid. Hmmmm......

    "Bin Song, MCP" <> wrote in message
    news:...
    > Hi, Roger
    >
    > From the sample in
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;311731
    > I noticed that there is a blank space between Data and Source:
    > strExcelConnector = "Provider=Microsoft.Jet.OLEDB.4.0;
    > Data Source=" + strFileName + "; Extended Properties=Excel 8.0;"
    > Can you try this?
    >
    > Bin Song, MCP
     
    Roger Twomey, Apr 27, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Lawson

    Could Not Find Installable ISAM

    Robert Lawson, Aug 28, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    4,042
    Robert Lawson
    Aug 29, 2003
  2. =?Utf-8?B?SlAgTGFjYXNzZQ==?=

    Error message: Could not find installable ISAM

    =?Utf-8?B?SlAgTGFjYXNzZQ==?=, Apr 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    634
    Teemu Keiski
    Apr 10, 2004
  3. Brent

    Could not find installable ISAM.

    Brent, Apr 29, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,537
    Brent
    May 3, 2004
  4. Sandeep

    Could not find installable ISAM

    Sandeep, May 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    490
    Teemu Keiski
    May 13, 2004
  5. ibeetb
    Replies:
    2
    Views:
    3,014
Loading...

Share This Page