hi all
does any one know how to connect and upload an excel file to a
vb.net data grid? i am not using sql server or a web application. i have excel 11.5612.5606 or thats wat it says on the about excel option.
the code that i have so far is exactly
Dim strconnection As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\documents and settings\shields\mydocuments\adminigraphics_backup \book1.xls; Extended Properties=Excel 11.5612.5606;"
Dim conn As New OleDb.OleDbConnection(strconnection)
conn.Open()
Dim objCmdSelect As New OleDbCommand("SELECT * FROM myRange1", conn)
Dim objAdapter1 As New OleDbDataAdapter
objAdapter1.SelectCommand = objCmdSelect
Dim objDataset1 As New DataSet
objAdapter1.Fill(objDataset1, "XLData")
dbg1.DataSource = objDataset1.Tables(0).DefaultView
as you can see, i do open the connection but when i compile the program and run it, it gives me a connection.dll error and shows that the error is in conn.open.
can any one explain what my problem is?
stephen daniel shields