急 在线等待!高手请进! .net问题
DataSet ds = new DataSet();
string strCon, strCmm;
String finalpath = this.FileUploadProduct.PostedFile.FileName;
strCon = "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" + finalpath + ";Extended Properties=Excel 8.0";
strCmm = "select * from [Sheet1$]";
OleDbConnection oleCnn = new OleDbConnection(strCon);
oleCnn.Open();
OleDbCommand oleCmm = new OleDbCommand(strCmm, oleCnn);
OleDbDataAdapter oleDa = new OleDbDataAdapter(oleCmm);
oleDa.Fill(ds);
oleCnn.Close();
return ds.Tables[0];
为什么只能导入03的xx.xls 当导入07的时候提示外部表的格式不正确?
求高手解决!