string conn = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =" +FileName + ";Extended Properties=Excel 8.0";
string Sql = "select * from [" + Table + "$]" + " where " + Condition + "<> null";
OleDbConnection thisconnection = new OleDbConnection(conn);
thisconnection.Open();
OleDbDataAdapter mycommand = new OleDbDataAdapter(Sql, thisconnection);
DataSet ds = new DataSet();
mycommand.Fill(ds, "[table]");
thisconnection.Close();