How do I password prot开发者_开发问答ect xls file using java code?
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?
Why not zip the file and password protect the zip file (http://merkert.de/de/info/zipaes/src.zip), using AesZipOutputStream.zipAndEcrypt(...))
精彩评论