excel导入出现错误,不支持关键字: “provider”。
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");