ADO for Excel ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, is it possible to access an xls Excel file via ADO.NET
If possilble, what is the provider name
Please advise
Peter
 
Hi Cor
Thanks. I need more help. I define my problem more precisely as below
* Office Version: 200
* Visual Studio version: 200
* language : C
* my code is as below
static void Main(string[] args

string connectionString
"Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=C:\\peter\\data\\test.xls;"
"Extended Properties=Excel 8.0;"
"HDR=Yes;IMEX=1";
OleDbConnection myOleDbConnection =new OleDbConnection(connectionString)
myOleDbConnection.Open()
myOleDbConnection.Close()

I got a runtime error. Please advise more. Thank
Pete
 
Hi Peter,

Did you see that your string ="\"Excel ........IMEX=1\""does not start and
end with " ?

Cor
 
¤ Hi, is it possible to access an xls Excel file via ADO.NET?
¤ If possilble, what is the provider name?

See the following:

HOW TO: Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316934&Product=adonet

HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual Basic .NET
http://support.microsoft.com/default.aspx?kbid=311731

HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual C# .NET
http://support.microsoft.com/default.aspx?kbid=306572


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top