日期:2014-05-18 浏览次数:20787 次
string sqlstr; sqlstr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + strpath + ";" + "Extended Properties=Excel 8.0;"; SqlConnection conn = new SqlConnection(sqlstr); SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM [Sheet1$]",conn); adapter.Fill(ds,"excel");