C#,求一个可以正确调用OleDbConnection.Open()的System.Data.dll文件
想通过OleDb读取新版Excel文件,但是总报错DllNotFoundException:gda-2,初步怀疑是System.Data.dll不匹配,求能正确执行这个函...
想通过OleDb读取新版Excel文件,但是总报错DllNotFoundException: gda-2,初步怀疑是System.Data.dll不匹配,求能正确执行这个函数的大神传一个dll文件~简单贴代码如下:
string strConn = "Provider=Microsoft.Ace.OleDb.12.0;" + "data source=" + FileFullPath + ";Extended Properties='Excel 12.0; HDR=NO; IMEX=1'";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
DataSet ds = new DataSet();
OleDbDataAdapter odda = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", conn);
odda.Fill(ds, SheetName);
conn.Close();
总是在执行到conn.Open();的时候抛出DllNotFoundException: gda-2 展开
string strConn = "Provider=Microsoft.Ace.OleDb.12.0;" + "data source=" + FileFullPath + ";Extended Properties='Excel 12.0; HDR=NO; IMEX=1'";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
DataSet ds = new DataSet();
OleDbDataAdapter odda = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", conn);
odda.Fill(ds, SheetName);
conn.Close();
总是在执行到conn.Open();的时候抛出DllNotFoundException: gda-2 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询