Hi Justin, Thank you very much for the response. This Excel file is not
password protected. I double checked.
FYI - My application runs on HP UX and downloads the excel file everyday
from user machine(Windows) and reads it.
Sara Uppalapati
IBM Global Services
513 277 4869
suppalap@us.i...
"Justin Warren" <
justin_warren@cons...>
04/24/2007 03:20 PM
Please respond to
"POI Users List" <
poi-user@jaka...>
To
"POI Users List" <
poi-user@jaka...>
cc
Subject
RE: Please help - unknown grbit '16'
I get a similar error when I attempt to read a password protected Excel
file. I'm not sure if that's what you have, but it's a possibility.
-----Original Message-----
From: Sara Uppalapati [mailto:
suppalap@us.i...]
Sent: Tuesday, April 24, 2007 2:53 PM
To:
poi-user@jaka...
Subject: Please help - unknown grbit '16'
Hi, We are using POI_3.0_Alpha.jar file and trying to read spread sheet
in the code. It was working fine until few days back. Spread sheet was
updated with more tabs and more data and after that getting below
errors.
I spent long time and still no clue. Spread sheet was updated on
windows
machine with office 2003. Please help.
Exceptions:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
:213)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.jav
a:149)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:183)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:230)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:211)
at ReadInvSheet.main(ReadInvSheet.java:47)
Caused by: org.apache.poi.hssf.record.RecordFormatException: Unknown
grbit
'16'
at
org.apache.poi.hssf.record.formula.ArrayPtg.readTokenValues(ArrayPtg.jav
a:98)
at
org.apache.poi.hssf.record.formula.Ptg.createParsedExpressionTokens(Ptg.
java:109)
at
org.apache.poi.hssf.record.NameRecord.fillFields(NameRecord.java:739)
at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
at
org.apache.poi.hssf.record.NameRecord.<init>(NameRecord.java:142)
... 10 more
Error in Reading : org.apache.poi.hssf.record.RecordFormatException:
Unable to c
onstruct record instance, the following exception occured: null
Code snippet:
try
{
fs = new FileInputStream(fileToBeRead);
System.out.println(" file read" );
FI = new FileInputStream(propertyFile) ;
FW = new FileWriter(fileToBeWritten);
}
catch(FileNotFoundException e)
{
throw new Exception(e);
}
catch(IOException e)
{
throw new Exception(e);
}
System.out.println("Before HSSFWorkbook Initiation");
HSSFWorkbook workbook = new HSSFWorkbook(fs);
System.out.println("After HSSFWorkbook Initiation");
Exception are right at initializing HSSFWorkbook() - HSSFWorkbook
workbook
= new HSSFWorkbook(fs);
I really appreciate the help.
Thanks,
Sara
---------------------------------------------------------------------
To unsubscribe, e-mail:
poi-user-unsubscribe@jaka...
Mailing List:
http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:
http://jakarta.apache.org/poi/
opensubscriber is not affiliated with the authors of this message nor responsible for its content.