sam
sam

Reputation: 1

how to password protect xls file using java code

How do I password protect xls file using java code?

Upvotes: 0

Views: 1021

Answers (2)

TheGuyNextDoor
TheGuyNextDoor

Reputation: 7937

Why not zip the file and password protect the zip file (http://merkert.de/de/info/zipaes/src.zip), using AesZipOutputStream.zipAndEcrypt(...))

Upvotes: 1

Heinrich Filter
Heinrich Filter

Reputation: 6158

Check out the Apache POI project. It is a Java API for Microsoft Documents, including Excel.

Even though I haven't used it myself, it seems like there is support for passwords in xls documents. If you want more detailed help you would need to be more specific, like @Sebastian says.

Edit: Is the protectSheet function from POI maybe what you are looking for?

Upvotes: 1

Related Questions