Is there a way to create open protected excel file in Java? I'm looking at JExcelApi and Apache Poi projects but with both of them I cannot figure out how to protect generated xls file. I want to assure that generated file can be opened only by people that know password phrase.
A:
One trick I've found when using POI is to create an Excel file with the feature I want embedded in it (e.g. a macro), and then use POI to open the file, modify it and then write it out.
So you may get what you want by creating a password-protected file, and then seeing if you can open and modify (and save) via POI. Of course, if password-protecting encrypts as well, then you're out of luck.
Brian Agnew
2009-07-07 13:51:42
That's a nice idea but I can't figure out how to open protected file either... Seeing that even OpenOffice can't open/write password protected xls make me now preety sure it can't be done at all.
mgamer
2009-07-07 13:54:49
Mmm. Think I'm out of ideas currently :-(
Brian Agnew
2009-07-07 14:01:05