如果受到“限制编辑”的保护,如何通过POI 3.8解密excel文件2007

时间:2022-01-12 20:24:02

In excel 2007, we can Protect Workbook by select "Protect Workbook" on menu and select "Protect Structures and Windows".

在excel 2007中,我们可以通过选择菜单上的“保护工作簿”并选择“保护结构和Windows”来保护工作簿。

I have file with extension ".xlsm" and it is protected like the way above. I have password of this file and I need to read it by POI 3.8 in java, how can I do that?

我有扩展名“.xlsm”的文件,它像上面的方式一样受到保护。我有这个文件的密码,我需要在java中通过POI 3.8阅读它,我该怎么做?

I used to use the class "Decryptor" to verify the password, but it useless. Please help me, I have stucked in this for 3 days...

我曾经使用类“Decryptor”来验证密码,但它没用。请帮助我,我已经坚持了3天......

1 个解决方案

#1


0  

You can make this

你可以做到这一点

  1. Create a Excel Object
  2. 创建Excel对象

  3. Open workbook
  4. Unprotect with password ActiveWorkbook.Unprotect
  5. 取消保护密码ActiveWorkbook.Unprotect

  6. Save file
  7. Open in POI
  8. 在POI中打开

  9. Remake steps 1 to 4, but protect file
  10. 重新制作步骤1到4,但保护文件

[]'s

#1


0  

You can make this

你可以做到这一点

  1. Create a Excel Object
  2. 创建Excel对象

  3. Open workbook
  4. Unprotect with password ActiveWorkbook.Unprotect
  5. 取消保护密码ActiveWorkbook.Unprotect

  6. Save file
  7. Open in POI
  8. 在POI中打开

  9. Remake steps 1 to 4, but protect file
  10. 重新制作步骤1到4,但保护文件

[]'s