string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = " + fileName + ";Extended Properties=Excel 8.0" ;
using(OleDbConnection conn= new OleDbConnection(strCon))
{
string strCom = " SELECT * FROM [Sheet1$]" ;
conn.Open() ;
OleDbDataAdapter myCommand = new OleDbDataAdapter(str , conn) ;
DataSet ds= new DataSet ( ) ;
myCommand.Fill(ds) ;
conn.Close() ;
}