Can HSSF read the values from an unprotected workbook?
IIRC, Protected/Unprotected is a gui function, doesn't affect the underlying spreadsheet. Soo, HSSF should be able to read it regardless. This looks like a unicode issue and font specifically..if you look at the stack trace. If you can toy with the font a bit u might be able to get around this.
Otherwise try to recreate this for us to look at and submit to Bugzilla..
Guilhaume Pinard-Legry wrote:
Hi all I've seen that my message was not very clear: I need to get values from cells that are in a password-protected workbook. but I can't! as there several thousands of files, I will not unprotect them manually Here is the error I get:
java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132) at Test.main(Test.java:30) Caused by: java.lang.IllegalArgumentException: Illegal length at org.apache.poi.util.StringUtil.getFromUnicodeHigh(StringUtil.java:76) at org.apache.poi.hssf.record.FontRecord.fillFields(FontRecord.java:135) at org.apache.poi.hssf.record.Record.fillFields(Record.java:90) at org.apache.poi.hssf.record.Record.<init>(Record.java:55) at org.apache.poi.hssf.record.FontRecord.<init>(FontRecord.java:88) ... 8 more org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132) at Test.main(Test.java:30)
Cr�ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr�ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis gr�ce � Yahoo! Messenger !T�l�chargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
