Reputation: 10069
In java i need to create a password protected excel without any third party jars.
Without any third party api we can create excel file in java. Because xls document is similar to html document and xlsx file is a zip file and this zip containd many xml.
For encryption here some information available http://chicago.sourceforge.net/devel/docs/excel/encrypt.html
But i dont know how to implement this encryption. How can i do ?
Upvotes: 4
Views: 3340
Reputation: 1012
You won't be able to create an Excel document without 3rd party JARs
.
This is because Excel is owned & copyrighted to Microsoft(R). They do have APIs available, and people have applied this to Java, one being JExcelApi.
JExcelApi doesn't support password protection however. For that, I only know of commercially available products, such as Aspose.Total for Java. However, bear in mind it's easy with Java to get around the password protection: (see here). Might be worth rethinking how you're doing password protection :)
Answer summary: Java itself doesn't have a built in way to manipulate Excel; you'll need to use an external library.
Upvotes: 6