Click here to Skip to main content
12,953,379 members (52,567 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all,
I want to import data from Excel to my datagridview in
when i import, it is error like this:Could not find installable ISAM

Here is my source code for import from excel to datagridview:
Dim MyConnection As System.Data.OleDb.OleDbConnection
Dim DtSet As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
            "D:\DOCUMENTS\PROJECTS\Company List\Customer List1.xls;Extended Properties=Excel 8.0;HDR=Yes;IMEX=1;")
MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Tabelle1$]", MyConnection)
MyCommand.TableMappings.Add("Table", "TestTable")
DtSet = New System.Data.DataSet
DataGridView1.DataSource = DtSet.Tables(0)

Does anybody know how to solve this prolem?


Posted 29-May-12 18:43pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

previously i got same error like this and i solved like this
'previous code
 'not working
        'Dim str As String
        'str = "D:\NAVEEN KUMAR\DOTNET\windows\WindowsApplication1\WindowsApplication1\csharp.xlsx"
        'con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & str & ";Extended Properties=""Excel 8.0 XMl;HDR=No;IMEX=1""")
        'con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\NAVEEN KUMAR\DOTNET\windows\WindowsApplication1\WindowsApplication1\csharp.xlsx;Extended Properties=\Excel 8.0; HDR=No; IMEX=1\")


'if u get any error like notfound installed isam means simply u have to change your
        'connection string insted of ur`s please paste below code and change microsoft excel or acess db to 97-2003 format
        con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\NAVEEN KUMAR\DOTNET\windows\WindowsApplication1\WindowsApplication1\123.xls;Extended Properties=""Excel 12.0 Xml;HDR=YES""") '

Change connection string like this
connectionstring=" Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\NAVEEN KUMAR\DOTNET\windows\WindowsApplication1\WindowsApplication1\123.xls;Excel 12.0 Xml;HDR=YES"
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Try this , it helpt me.

In a connection string you use |DataDirectory| to represent the program folder.

connectionstring=" Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\123.xls;Excel 12.0 Xml;HDR=YES"
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Don't use Jet. Use ACE

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\DOCUMENTS\PROJECTS\Company List\Customer List1.xls;Extended Properties="Excel 8.0;HDR=YES";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,930

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100