The following code, the interrupt point error: "Microsoft.Jet.OLEDB.4.0" Provider is not registered on the local computer
DataSet ds=NewDataSet ();Try { stringStrcon =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:/test.xls; Extended properties= ' Excel 8.0; Hdr=yes;imex=1 '"; OleDbConnection Olecon=NewOleDbConnection (Strcon); Olecon.open (); OleDbDataAdapter Oleda=NewOleDbDataAdapter ("select * FROM [sheet$]", Olecon); Oleda.fill (DS); }Catch(Exception ex) {MessageBox.Show (ex). Message+ ex. Source +Ex. innerexception); }
Issues and workarounds to be aware of:
1.microsoft.jet.oledb.4.0 do not write miscrosoft.jet.oledb.4.0,;
2.Data source does not write "Data sourse",
3. Check if Office is installed
4. Reinstall the registration MDAC28.exe (usually in your VS installation directory or up to Microsoft's official website)
Http://www.jb51.net/softs/20587.html
5. This may also occur if you are a 64-bit platform; Workaround: Click on the "Any CPU tab--new" new platform with Configuration Manager--
Workaround for the microsoft.jet.oledb.4.0 provider is not registered on the local computer