exception in creating excel

Posted by Nishithraj under Regular Expressions on 1/20/2010 | Views : 1529 | Status : [Member] | Replies : 1
I'm getting following exception while locking some cells through owc.(excel through Owc11.0)
Following is the code.

xl.ActiveSheet.Cells.Locked = true;
xl.ActiveSheet.Protect("password");


Error	1	Property, indexer, or event 'Locked' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.Owc11._Range.get_Locked()' or 'Microsoft.Office.Interop.Owc11._Range.set_Locked(bool)'	D:\TestOWC\Default.aspx.cs	60	34	D:\TestOWC\ 


Mark this as answer, if it is.....

With regards
Nishithraj Narayanan



Responses

Posted by: Nishithraj on: 1/21/2010 [Member] Bronze

Up
0
Down
Does any one has the answer. Otherwise any body knows how to set the password for a sheet through OWC component, Kindly reply me....

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response