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




Reply With Quote