日期:2014-05-18 浏览次数:20834 次
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\t.xls;Extended Properties=\"Excel 8.0; Imex=1;HDR=yes;\";"; OleDbConnection con = new OleDbConnection(connString); con.Open(); DataTable ret = con.GetSchema("Tables"); con.Close(); foreach (DataRow row in ret.Rows) { Response.Write(row["TABLE_NAME"] + "<br>"); }