locked
Cannot connection to excel file using oledb by asp.net application RRS feed

  • Question

  • I got an error 'Could not find installable ISAM' to connect to the excel file (*.xls) in asp.net application. My server use OS Window Server 2008(x64) R2 Enterprise and I had installed the Microsoft Office 2007 on it. Here is my connetionstring : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.xls;Extended Properties=HDR=Yes;IMEX=1;

    Anybody has any idea to solve it.

     

    Thanks you in advance.


    • Edited by New_CBH Tuesday, November 1, 2011 12:13 PM
    Tuesday, November 1, 2011 12:08 PM

Answers

  • Hi,

    This is the 32bit provider for excel, so you should change your project's Build setting---- Platform target to : X86.

    Have a nice day.

     


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Alan_chen Wednesday, November 16, 2011 2:03 AM
    Wednesday, November 2, 2011 8:47 AM
  • In IIS Manager you need to change the Enable 32-bit Applications property to True for the application pool the app is configured to run in.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Alan_chen Wednesday, November 16, 2011 2:03 AM
    Wednesday, November 2, 2011 2:38 PM

All replies

  • Hi New_CBH,

    Even though you have office 2007 installed you may need to install this driver and then change your connection string:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23734

    Then, change your connection string to:

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=test.xls;Extended Properties=HDR=Yes;IMEX=1;
    
    

     


    Tom Overton
    Tuesday, November 1, 2011 12:30 PM
  • Hi Tom Overton,

    Thanks for your reply. I have followed your step, but I still got the same error message.

     

    Any solution?

     

    Thanks you in advance.

    Tuesday, November 1, 2011 12:53 PM
  • Hi,

    This is the 32bit provider for excel, so you should change your project's Build setting---- Platform target to : X86.

    Have a nice day.

     


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Alan_chen Wednesday, November 16, 2011 2:03 AM
    Wednesday, November 2, 2011 8:47 AM
  • In IIS Manager you need to change the Enable 32-bit Applications property to True for the application pool the app is configured to run in.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Alan_chen Wednesday, November 16, 2011 2:03 AM
    Wednesday, November 2, 2011 2:38 PM