You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/11/06 15:33:57 UTC
[Bug 60347] New: Reading password protected worksheet (version -
excel 95,97-2003)
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
Bug ID: 60347
Summary: Reading password protected worksheet (version - excel
95,97-2003)
Product: POI
Version: 3.13-FINAL
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSSF
Assignee: dev@poi.apache.org
Reporter: barak.kedem@datorama.com
Target Milestone: ---
I have a password protected worksheet create with excel 95,97-2003
i have the password and i was trying to read this file in different ways
Method 1:
WorkbookFactory.create(inputStream, "password");
throws: org.apache.poi.EncryptedDocumentException: HSSF does not currently
support CryptoAPI encryption
Method 2:
protected InputStream WorkbookProtectionUnlocker(NPOIFSFileSystem fs,
String password) throws AAAAException {
EncryptionInfo info;
try {
info = new EncryptionInfo(fs.getRoot());
} catch (IOException e) {
throw new AAAException(e.getCause());
}
Decryptor d = Decryptor.getInstance(info);
org.apache.poi.EncryptedDocumentException: HSSF does not currently support
CryptoAPI encryption
also throw the same exception
Method 3:
org.apache.poi.hssf.record.crypto.Biff8EncryptionKey.setCurrentUserPassword("password");
Workbook wb = new HSSFWorkbook(new FileInputStream(file);
same exception .
Method 4:
read about jxl.Workbook.getWorkbook but in this object the password is only
allowed setting it to the sheet not the entire worksheet .
throw this error: jxl.read.biff.PasswordException
since its not possible setting the password to the worksheet .
method 5
org.apache.poi.hssf.record.crypto.Biff8EncryptionKey.setCurrentUserPassword(fileInfo.getFileOptions().xlsWorkbookPasswordExpression);
WorkbookFactory.create(new
FileInputStream(fileInfo.getInputFile()));
the same exception:
org.apache.poi.EncryptedDocumentException: HSSF does not currently support
CryptoAPI encryption
what is the correct way of Opening HSSF workbook which is password protected ?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60347] Reading password protected worksheet (version - excel
95,97-2003)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
Barak <ba...@datorama.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60347] Reading password protected worksheet (version - excel
95,97-2003)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
--- Comment #3 from Barak <ba...@datorama.com> ---
Created attachment 34425
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34425&action=edit
Excel file 95 with password
password is 12345
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60347] Reading password protected worksheet (version - excel
95,97-2003)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
OS| |All
--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
Can you try with a nightly? ... I have added CryptoAPI support just recently.
If this fails, could you send me the file on my apache email?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60347] Reading password protected worksheet (version - excel
95,97-2003)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
--- Comment #4 from Andreas Beeker <ki...@apache.org> ---
The "Excel file 95" is in Biff5 format, which is not supported by the HSSF
classes - although there's an OldExcelExtractor class, I haven't implemented
the crypto logic there.
The other excel file opens just fine:
Biff8EncryptionKey.setCurrentUserPassword("12345");
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream("Canada - 97-2003
Pass.xls"));
With "nightly" I meant a development build:
https://builds.apache.org/job/POI/lastSuccessfulBuild/artifact/build/dist/
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60347] Reading password protected worksheet (version - excel
95,97-2003)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60347
--- Comment #2 from Barak <ba...@datorama.com> ---
Created attachment 34424
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34424&action=edit
Excel file with password
password is 12345
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org