poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vishal_sinha <vishal.si...@adeptia.com>
Subject Re: [Bug 56564] New: RecordFormatException: Unknown encryption info 4
Date Mon, 29 Sep 2014 11:21:19 GMT
data.xls <http://apache-poi.1045710.n5.nabble.com/file/n5716740/data.xls>  

Hello, 
I am creating a password protected file of format Excel 97-2003 Workbook
(.xls) using Microsoft Office 2013. 
I have written a java program to read password protected excel file using
POI API. I am able to read .xlsx file using this API, but I am not able to
read .xls file. It throws error : 
org.apache.poi.hssf.record.RecordFormatException: Unknown encryption info 4 
        at
org.apache.poi.hssf.record.FilePassRecord.<init>(FilePassRecord.java:70) 
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) 
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source) 
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) 
        at java.lang.reflect.Constructor.newInstance(Unknown Source) 
        at
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:87)

        at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:338) 
        at
org.apache.poi.hssf.record.RecordFactoryInputStream$StreamEncryptionInfo.<init>(RecordFactoryInputStream.java:73)

        at
org.apache.poi.hssf.record.RecordFactoryInputStream.<init>(RecordFactoryInputStream.java:182)

        at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:477) 
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:301) 
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:264) 
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:199) 
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342) 
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:323) 

Using same java code I am able to read .xls file if I use Microsoft Office
2010 to create this password protected file. 
My OS is Windows 8(64-bit). 
I am using latest Apache POI API i.e. “poi-3.10.1-20140818.jar”. 
Can you please let me know how I can solve this issue. I have attached XLS
file for reference. 
Please ASAP.
Thanks 
Vishal 



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-56564-New-RecordFormatException-Unknown-encryption-info-4-tp5715713p5716740.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message