Jump to content
We've recently updated our Privacy Statement, available here ×

Protect xls document


jmbernal

Recommended Posts

  • 2 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 5 years later...

I have not used JR 1.x but in the 4.x versions you can set the following property:

xlsExporter.setParameter(JRXlsExporterParameter.PASSWORD, "MyPassword");

to protect the spreadsheet, I'm pretty sure that this property was added in v3

 

The property is only available in xml mode and not supported by iReport GUI
To include the password protection you have to go to XML mode and add the following to your JRXML file:

<property name="net.sf.jasperreports.export.xls.password" value="MyPassword"/>

Mariano

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...