poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sateesh K Kolusu" <sateesh.kol...@in.ibm.com>
Subject Re: Password protected workbook working with POI 3.9 but not working POI 3.14
Date Mon, 27 Feb 2017 11:48:48 GMT
The attachment(s) test1.xlsx could not be scanned for viruses because it is a password protected
file.

**********************************************************************
Hello Javen - Thank you for the prompt reply

The file in question is 



The password is "qa"

At the time of moving to higher version of POI we had 3.14 in mind and so 
we moved. 

The stack trace is 
org.apache.poi.EncryptedDocumentException: The supplied spreadsheet seems 
to be an Encrypted .xlsx file. It must be decrypted before use by XSSF, it 
cannot be used by HSSF 

---
Thanks
Sateesh K Kolusu
Software Engineer - Connectivity
IBM Analytics



From:   "Javen O'Neal" <onealj@apache.org>
To:     POI Users List <user@poi.apache.org>
Date:   02/27/2017 05:10 PM
Subject:        Re: Password protected workbook working with POI 3.9 but 
not working POI 3.14



If you included an attachment, it didn't make it through.

Are you getting a compile time or run time error? What is the error 
message
and stack trace?

You're welcome to read through the changelog at
https://poi.apache.org/changes.html to see what changes occurred. If you
don't find anything that explains your problem, you can search through
bugzilla or look for changes to the source if you can narrow it down to a
few files.

Did you try any other builds?

We have made quite a few improvements to password protection in the last
few versions, and it's possible that one or more of those changes broke
backwards compatibility. We aim for maintaining deprecated APIs for at
least 2 releases prior to removing or changing them, so you may want to
compile with 3.11 with deprecated usage ignored, then compile with 3.11
with deprecated usage as fatal, then compile with 3.13 and repeat, then
3.15 and repeat.

FYI, 3.15 is the latest final version. Any reason for testing with 3.14?

On Feb 27, 2017 3:20 AM, "Sateesh K Kolusu" <sateesh.kolusu@in.ibm.com>
wrote:

Hello all -  I have a Excel workbook with password protected. The
following code worked with APACHE POI 3.9 but not 3.14

if (POIFSFileSystem.hasPOIFSHeader(fileIn) == true)
         {
            try
            {
               workbook = new HSSFWorkbook(fileIn, bDocProps);
            }
            catch (EncryptedDocumentException encryptedEx)
            {
               encryptionException = true;
               // Supplied password is invalid for Excel 2003 file
               message = CC_UnstructuredResourceBundle.getString(
                     "CC_UNSTRUCTURED_MSG_EXCEL_INVALID_PASSWORD");

            }

Any inputs if there are changes in 3.14 will be appreciated.

---
Thanks
Sateesh





Mime
View raw message