• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Range Protection in Excel File using Jakarta POI  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jakarta HSSF POI to create an excel file in Java. I am able to set password protection for the whole sheet.

But I need to set it only for a few columns and the others should be editable.

I checked in Excel and there is an option "Allow Users to Edit Ranges".

Is this feature available in Jakarta or are there any other APIs that have this feature.

Please Help.

Thanks
M
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi you said... I am able to set password protection for the whole sheet.
can you share that code...

[ UD: Please UseTheForumNotEmail ]
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HSSFSheet class has methods to protect a sheet. Search its javadocs for "password".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!