简体   繁体   中英

Password protected xls file using DynamicReports in Java

I am trying to generate a password protected xls file using DynamicReports 4.1 which is internally using JasperReports 6 .

Here is the code:

JasperXlsExporterBuilder xlsBuilder = export
                    .xlsExporter(report);
            if (null != password) {
                xlsBuilder.setPassword(password);
            }

Problem is that it created only readonly protected file. Password is not asked for opening the file. I have tried with Apache POI as well, same thing would happen (as JasperXlsExporter using Apache POI only I guess). I have a requirement of open protected xls and not read only protection.

Is this achievable?

正如您已经注意到的那样,由于Apache POI库尚未支持XLS工作簿加密,因此目前尚无法实现。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM