Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello guys , in my own self study about import an excel file to my data grid view
within coding i tried to put password on the excel file, and i close it

i coded at the conncetion string like this


C#
cn1.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + myPath + ";Extended Properties=" + "\"Excel 12.0 Xml;HDR=YES;IMEX=1\"";
(local connection string without password)

What I have tried:

and then i try with a password

C#
cn1.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + myPath + ";Password=haha;Extended Properties=" + "\"Excel 12.0 Xml;HDR=YES;IMEX=1\"";



exception happens :
Quote:
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Posted
Updated 14-Dec-16 22:22pm

1 solution

 
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