I'm trying to read excel files using C# following some tutorials I found online but I think I'm forgetting something because the method names don't seem to be recognized. Do I need to import something?
Code:using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.OleDb; namespace ConsoleApplication1 { class ExcelReader { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\user\My Documents\test.xls;Extended Properties=Excel 8.0"); OleDbCommand com = new OleDbDataAdapter("select * from table", con); con.Open(); //Error is here } }



LinkBack URL
About LinkBacks


