hi All ,

I am creating a program that will import the data of excel files to my datagridview on my program.
here is the code i search.

Code:
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try

            Dim MyConnection As System.Data.OleDb.OleDbConnection
            Dim dataset As System.Data.DataSet
            Dim myCommand As System.Data.OleDb.OleDbDataAdapter
            Dim path As String = "C:\\Users\\lb770017\\Documents\\test.xlsx"

            MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties 12.0;")
            myCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection)
            dataset = New System.Data.DataSet
            myCommand.Fill(dataset)
            DataGridView1.DataSource = dataset.Tables(0)
            MyConnection.Close()
        Catch ex As Exception
            MsgBox(ex.Message.ToString)

        End Try
    End Sub
it throws an exception message that
format of the initialization string does not conform to specification starting at index 88

my excel file will only compose 1 column
Name:  Capturedd.PNG
Views: 1095
Size:  9.1 KB