Is it possible to set up an ODBC or OLEDB link to an Excel document and read data from it into a VB recordset in the same way you would connect and read an Access database?
I have tried coding a program exactly the same way as I would code an Access program and changed the connection string to:-
ConDirect1.ConnectionString ="Provider=MSDASQL.1;Per" & _
"sist Security Info=False;" & _
"Data Source=Budgets;Mode=" & _
"Read;Initial Catalog=C:\" & _
"Program Files\Microsoft " & _
"Visual Studio\VB98" & _
"\ReadBudgets\\Examples.xls"
When I try to access the Excel file via an SQL command in VB I get the error:-
'The microsoft Jet database engine could not find the object ExampleNewFormat.'
Sooo... can it be done?
Should I be doing it a different way?
Dazed and confused
I have tried coding a program exactly the same way as I would code an Access program and changed the connection string to:-
ConDirect1.ConnectionString ="Provider=MSDASQL.1;Per" & _
"sist Security Info=False;" & _
"Data Source=Budgets;Mode=" & _
"Read;Initial Catalog=C:\" & _
"Program Files\Microsoft " & _
"Visual Studio\VB98" & _
"\ReadBudgets\\Examples.xls"
When I try to access the Excel file via an SQL command in VB I get the error:-
'The microsoft Jet database engine could not find the object ExampleNewFormat.'
Sooo... can it be done?
Should I be doing it a different way?
Dazed and confused