提问
DataTable mydt = new DataTable();
DataSet ds = new DataSet();
OleDbConnection objconn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\毕业设计zhangjie\\2007级新生信息.xls;Extended Properties=Excel 8.0;");
objconn.Open();
DataTable st = objconn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);
string table = "计算机科学与技术";
string strsql = "select * from [计算机科学与技术$]";
OleDbCommand objcmd = new OleDbCommand(strsql, objconn);
OleDbDataAdapter mydata = new OleDbDataAdapter(strsql, objconn);
mydata.Fill(ds, table);
GridView1.DataSource = ds;
GridView1.DataBind();
objconn.Close();