POI 3.14 fails to read an excel file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

POI 3.14 fails to read an excel file

Sateesh K Kolusu
Hello all - Good day.  I have a requirement to read an excel file with the
cell range.  I see a strange behavior where the file fails to read but it
succeeds when the excel file is opened and saved. The customer claims the
file is created in Excel 2010. I am using POI 3.14

My questions
1) Have you encountered this kind of of behavior with excel file and
reading before.
2) How do we cross check the source of creation ( Office 365 Excel 2019
Excel 2016 Excel 2013 Excel 2010 Excel Starter 2010, Apache open office)
and its  compatibility with POI.
3) Does "open and save an excel file" convert the file to be compatible to
read?

Any other information that you feel so is appreciated.

---
Thanks
Sateesh

Reply | Threaded
Open this post in threaded view
|

Re: POI 3.14 fails to read an excel file

Andreas Reichel
Sateesh,

to me that sounds like a challenge with the Zip64.
If my memory does not fail me, POI-3.18 has gotten a proper Zip64
implementation based on commons-compress with an important fix in POI
4.1.1.

My recommendation is: try POI 4.1.1 first. There were so many API
changes since 3.14 that using 3.14 now would be a dead end in anyway.

Possible workaround: Unzip and rezip the file using the (Unix/Linux) OS
commands, then read with POI.

Best regards
Andreas

On Tue, 2019-11-05 at 19:32 +0530, Sateesh K Kolusu wrote:

> Hello all - Good day.  I have a requirement to read an excel file with the
> cell range.  I see a strange behavior where the file fails to read but it
> succeeds when the excel file is opened and saved. The customer claims the
> file is created in Excel 2010. I am using POI 3.14
>
> My questions
> 1) Have you encountered this kind of of behavior with excel file and
> reading before.
> 2) How do we cross check the source of creation ( Office 365 Excel 2019
> Excel 2016 Excel 2013 Excel 2010 Excel Starter 2010, Apache open office)
> and its  compatibility with POI.
> 3) Does "open and save an excel file" convert the file to be compatible to
> read?
>
> Any other information that you feel so is appreciated.
>
> ---
> Thanks
> Sateesh
>

Reply | Threaded
Open this post in threaded view
|

POI 3.14 fails to read an excel file with password - Export Restrictions in place - please install JCE Unlimited Strength Jurisdiction Policy files

Sateesh K Kolusu
I am using POI 3.14 and when trying to read an Excel 2016 file with
password, I get this error
org.apache.poi.EncryptedDocumentException: Export Restrictions in place -
please install JCE Unlimited Strength Jurisdiction Policy files

The same excel file without password works fine to be read.

Appreciate your inputs for a possible solution for this.

Thanks
Sateesh


Reply | Threaded
Open this post in threaded view
|

Re: POI 3.14 fails to read an excel file with password - Export Restrictions in place - please install JCE Unlimited Strength Jurisdiction Policy files

Jörn Franke
You have to install the unrestricteds encryption policies, if you use Oracle JDK:

https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html?printOnly=1

Note you need the right version matching your JDK.

> Am 18.12.2019 um 13:56 schrieb Sateesh K Kolusu <[hidden email]>:
>
> I am using POI 3.14 and when trying to read an Excel 2016 file with
> password, I get this error
> org.apache.poi.EncryptedDocumentException: Export Restrictions in place -
> please install JCE Unlimited Strength Jurisdiction Policy files
>
> The same excel file without password works fine to be read.
>
> Appreciate your inputs for a possible solution for this.
>
> Thanks
> Sateesh
>
>
Reply | Threaded
Open this post in threaded view
|

RE: POI 3.14 fails to read an excel file with password - Export Restrictions in place - please install JCE Unlimited Strength Jurisdiction Policy files

Sateesh K Kolusu
Thanks Jörn. I am using IBM JDK and downloaded and copied them to the
right location and it works.


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



From:   "Jörn Franke" <[hidden email]>
To:     POI Users List <[hidden email]>
Date:   18-12-2019 18:34
Subject:        [EXTERNAL] Re: POI 3.14 fails to read an excel file with
password - Export Restrictions in place - please install JCE Unlimited
Strength Jurisdiction Policy files



You have to install the unrestricteds encryption policies, if you use
Oracle JDK:

https://urldefense.proofpoint.com/v2/url?u=https-3A__www.oracle.com_technetwork_java_javase_downloads_jce8-2Ddownload-2D2133166.html-3FprintOnly-3D1&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=VZRXZ2LRgTXiebvthnjLYQxL8LCXhtjoQI4SsCYJWOU&m=pzhaNCecXNCTRoXeqRM1MTL_yWA9GApqPem6uMqIwdo&s=pNbFRhQKkNTbAqSkB-lWYwDskX9VVmVWP9-axZdVx2E&e= 


Note you need the right version matching your JDK.

> Am 18.12.2019 um 13:56 schrieb Sateesh K Kolusu
<[hidden email]>:
>
> I am using POI 3.14 and when trying to read an Excel 2016 file with
> password, I get this error
> org.apache.poi.EncryptedDocumentException: Export Restrictions in place
-

> please install JCE Unlimited Strength Jurisdiction Policy files
>
> The same excel file without password works fine to be read.
>
> Appreciate your inputs for a possible solution for this.
>
> Thanks
> Sateesh
>
>