poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60347] New: Reading password protected worksheet (version - excel 95,97-2003)
Date Sun, 06 Nov 2016 15:33:57 GMT
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


Mime
View raw message