Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POI - How to Block the cell of an excel.

 
vishnu vyasan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am creating an excel file using jakartha POI. now i have to block some fields of the excel so that the user wont be modifing it. I have tried the HSSFCellStyle class and its setLocked(true) method, but unfortunatly not working for me.

any help on this would be appriciated.
Regards
vishnu nv
 
Kuladip Yadav
Ranch Hand
Posts: 162
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For that first you want to protect your sheet

using

and then use setLocked(true) to cells that you are interested.

Try This.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic