java 生成excel加密文件

excel加密文件,需要输入密码后才可以打开excel。

poi是比较通用的excel开发包,但无法生成excel加密文件。

jxcell则可以生成加密excel,以下代码读取excel并对excel进行加密然后保存。

// 使用jxcell加密
View view = new View();
view.read(new FileInputStream(file));
view.write(new FileOutputStream(file), userPass);

 

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>