我在.NET中用OleDB读取Excel的时候,出现一个奇怪的错误,信息如下:
A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll

具体过程如下:
string strConn = "Provider=Microsoft.Jet.OleDb.4.0; Data Source=G:/20050613632542542401718750.xls; Extended Properties='Excel 8.0;IMEX=1;'";
DataSet dst = new DataSet();
try
 {
     OleDbDataAdapter ad = new OleDbDataAdapter("SELECT * FROM [Sheet1$]",strConn);
     ad.Fill(dst);

 }
catch (SqlException ex)

在Fill的时候报错,查了一些资料也没有找到具体原因,希望有大大帮忙解决一下

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2021-11-17
  • 2022-01-14
  • 2022-12-23
  • 2021-07-08
  • 2021-10-30
  • 2021-09-21
猜你喜欢
  • 2021-10-22
  • 2021-09-19
  • 2021-12-03
  • 2021-07-27
  • 2021-04-18
  • 2022-02-18
相关资源
相似解决方案