[RESOLVED] Error - Could not find installable ISAM.
I'm receiving the error - Could not find installable ISAM. at the line MyCommand.Fill(DT) in the following code.
What is confusing to me is that I downloaded a sample project for reading data from an Excel workbook in the same way, written in C# that runs fine.
Code:
Private Sub exceldata()
Dim filename As String = "C:\Documents and Settings\Dave\My Documents\Programming\Book1.xlsx"
Dim MyCommand As OleDb.OleDbDataAdapter
Using MyConnection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" &
"Data Source=" & filename & ";" &
"Extended Properties=Excel 12.0 Xml;" &
"HDR=No;" &
"IMEX=1")
MyCommand = New OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection)
Dim DT As New Data.DataTable
MyCommand.Fill(DT)
DataGridView1.DataSource = DT
End Using
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Re: Error - Could not find installable ISAM.
Install the latest version of MDAC setup and see if the problem goes away.
Re: Error - Could not find installable ISAM.
I've got MDAC v2.81.1132.0 which I thought was the latest version. Also, is OleDB the usual way to read data from Excel?
Re: Error - Could not find installable ISAM.
While that error is supposed to mean that the driver/provider isn't installed, it usually means is that something is wrong with your connection string. Check www.connectionstrings.com to see valid examples, you just need to change file names etc.
Quote:
Also, is OleDB the usual way to read data from Excel?
It is one of the usual ways... the other is to automate Excel (as shown in the Office Development FAQs), but that requires Excel to be installed.
Re: Error - Could not find installable ISAM.
Re: Error - Could not find installable ISAM.
Quote:
Originally Posted by
si_the_geek
While that error is supposed to mean that the driver/provider isn't installed, it usually means is that
something is wrong with your connection string. Check
www.connectionstrings.com to see valid examples, you just need to change file names etc.
It is one of the usual ways... the other is to automate Excel (as shown in the Office Development FAQs), but that requires Excel to be installed.
Thank you. It was my connection string. The error led me off track in finding the trouble.
I appreciate your help.
Re: Error - Could not find installable ISAM.
No problem. :)
As you now have it sorted out, could you please do us a little favour, and mark the thread as Resolved?
(this saves time reading for those of us who like to answer questions, and also helps those who search to find answers)
You can do it by clicking on "Thread tools" just above the first post in this thread, then "Mark thread resolved". (like various other features of this site, you need JavaScript enabled in your browser for this to work).