Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am also facing the same issue.

if my datasource is like below then i am getting: Could not find installable ISAM


C#
string path = FileUploadContacts.PostedFile.FileName;
        string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;HDR=YES";


If i place the below code the error is : The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data.



C#
string path = FileUploadContacts.PostedFile.FileName;
      string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0; ";


I have checked many articles and posts from last 2 days but still not able to fix this. Kindly help me to solve this.


[edit]Code block added, SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 23-Nov-13 5:50am
v2
Comments
OriginalGriff 23-Nov-13 11:50am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
PIEBALDconsult 23-Nov-13 12:09pm    
Ensure that you have apostophes around the path.

1 solution

Put below connection string in your code or rather just put IMEX=1 in your connection string like below...
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\test.xls;
Extended Properties='Excel 12.0;HDR=Yes;IMEX=1';");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900