how to make the content in an excel cell read only?!

  • Thread starter Thread starter NA_AB
  • Start date Start date
well, am actually working with c# and developing an excel addin. I need to
make some excel cells, having some text, read-only and the rest of the sheet
is free to any modifications by the user.

Regards.
 
Select Cell
Data -> Validation -> Setttings -> Validation Criteria -> Select "Custom" ->
in Formula enter "=" (equal sign)
That's it. Excel will not allow you to change value
 
hey sorry ppl but i would appreciate if i can be provided with a simple code
which may be appear like, ((Range)myapp.cells[r,c]).isreadonly() or something
like that, cuz there are many different cells that i would want to make read
only and many others editable(read n write). And simon, truly speaking, i do
not want to transfer user control to any other cell. Am basically building an
excel com add-in using visual studio and c#.net tech. I can access a range of
cell/ cells in my current application's active sheet and in this sheet i
should be able to make some cells read only dynamically and later should also
be able to remove the constraint(read only) on the cells of my choice.

i see that many things can be done in vb but i am not able to convert or
find similar functionalities in c#, so please provide me with the code in
c#...

Regards,
na_ab
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top