Dim path As String = "C:\faktura.xls" Dim myDataset As New DataSet() Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=" & path & "; " & _ "Extended Properties=Excel 8.0;" Dim myData As New OleDbDataAdapter("SELECT * FROM [Faktura$]", strConn) myData.TableMappings.Add("Table", "ExcelTest") myData.Fill(myDataset) DataGridView2.DataSource = myDataset.Tables(0).DefaultView
I've both double checked the path is right, and the sheet name is right.
I want the excel sheets into my datagridviewer, But the problem is that this dosn't work. It dosn't add any row's or coulums. Just stays grey.
I've tryed using serveal codes, did my reseach, but I just can't get this working.