Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Password protected xls/xlsx file in java  RSS feed

 
Happy S Singh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created password protected zip file which has xls file with the help of this http://java.sys-con.com/node/1258827.

My question is ,Is there any java api which will create password protected xls file instead of zip file. I want to directly apply password on xls file.Encryption/Decryption is the option but want to prompt when when double clicked on file.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache POI can do this.
 
Happy S Singh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check out the org.apache.poi.poifs.crypt package? There's not much in the JavaDocs but you might look around for examples. Just a thought it would be worth looking into before you dismiss what Ulf said just like that.
 
Happy S Singh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this ,but it only makes sheet read only.


Even I have tried this ,but its not prompting for password.

Did you check out the org.apache.poi.poifs.crypt package?

I didn't got example of .Please share the link of example.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!