string strConn = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" + FilePath + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1;'";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
OleDbCommand comm = new OleDbCommand("SELECT*FROM[Sheet1$]", conn);
OleDbDataReader myReader = comm.ExecuteReader(CommandBehavior.CloseConnection);
转载于:https://www.cnblogs.com/freedom831215/archive/2010/03/30/1700555.html