• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generation of password protected excel file using JasperReports  RSS feed

 
kazeopeia joshi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I just want to generate a password protected excel report using JasperReports.

I have no problem in generating an excel report using the following lines of code :



But I need the generated excel file to be password protected and that I don't know how.
Please do help me. I know there's just something missing here because the code above is successful and it works just fine. That's why I wanted to keep it, I just need help on the "password protecting" part.

Please, please, please.
Thanks a lot!!
 
Campbell Ritchie
Marshal
Posts: 56530
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question too difficult for “beginning”. I shall move it.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you use the JRXlsExporterParameter.PASSWORD code? It seems that that should do the trick.

Alternatively, you could try using the Apache POI to protect the file after it has been created.
 
kazeopeia joshi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer,

Read your post re "BeForthrightWhenCrossPostingToOtherSites:" I'll keep that in mind in my next posts. Sorry for this one.

My apologies again for not replying for a long time, I wasn't able to get back to this jasper issue until today, sorry. I hope you can still help me.

JRXlsExporterParameter.PASSWORD code did not do the trick. It didn't make any difference. I was still able to generate a report successfully but still not password protected.

I am using JR 3.7.5
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!