2

Please help me with this code .I Am Downloading a file with xls Extension and uploading the same file Gives me (Could not find installable ISAM) Error .

I have tried With Almost everyConnection string but Still was not able to debug this error

if (FileExtension == "xls") { connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + ServerFullPath + FileName + ";Extended Properties=Excel 8.0 Xml"; } else { connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ServerFullPath + FileName + ";Extended Properties=Excel 12.0"; }

enter image description here The error Comes while opeing the connection i.e (oledbconn.open())

4

1 回答 1

0

这对我有用。

字符串文件路径 = "C:\upload\abc.xls";

string Consr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filepath + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1;'";

于 2015-05-19T10:21:30.640 回答