How to create password protected excel in Java?

In java, I need to create a password protected excel without any third party banners.

Without a third-party api, we can create an excel file in java. Since the xls document is like an html document, and the xlsx file is a zip file, and this zip contains a lot of xml.

Some information is available for encryption here http://chicago.sourceforge.net/devel/docs/excel/encrypt.html

But I do not know how to implement this encryption. How can i do

+4
source share
1 answer

You cannot create an Excel document without third-party JARs .

This is because Excel is owned and copyrighted by Microsoft (R). They have APIs and people have applied this to Java, one of which is JExcelApi .

JExcelApi does not support password protection. For this, I only know commercially available products, such as Aspose.Total for Java . However, keep in mind that with Java you can easily get around password protection: (see here) . It might be worth rethinking how you make password protection :)

Summary of responses: Java itself does not have a built-in way to manage Excel; you will need to use an external library.

+6
source

All Articles