Hi

It looks like you have hit a bug in ArrayPtg [1] parsing. I think you should
file a bug with your sample xls file attached [2]. 

I hope one of the poi devs will be able to better comment on the issue. 

Meanwhile try asking your user to create there worksheet without using Array
formulas, see:

http://www.cpearson.com/excel/array.htm 
http://www.ozgrid.com/Excel/arrays.htm 

[1] 
http://svn.apache.org/viewvc/jakarta/poi/trunk/src/java/org/apache/poi/hssf/
record/formula/ArrayPtg.java?view=markup 

[2]
http://issues.apache.org/bugzilla/buglist.cgi?product=POI 

Regards,
Tahir Akhtar
> -----Original Message-----
> From: Sara Uppalapati [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 25, 2007 6:06 PM
> To: POI Users List
> Cc: 'POI Users List'
> Subject: RE: Please help - unknown grbit '16'
> 
> Hi Tahir,  Thanks for your response.  I opened user's version of excel
> file on my machine(which has office 2000) and saved as of type Microsoft
> Excel 97-2000 & 5.0/95 Workbook.  I am still geting same errors when I
> tried to run my program with that excel file.
> 
> Sara
> 
> 
> 
> 
> "Tahir Akhtar" <[EMAIL PROTECTED]>
> 04/25/2007 01:52 AM
> Please respond to
> "POI Users List" <[email protected]>
> 
> 
> To
> "'POI Users List'" <[email protected]>
> cc
> 
> Subject
> RE: Please help - unknown grbit '16'
> 
> 
> 
> 
> 
> 
> It could be because of version incompatibility. May be user machine have
> upgraded to newer version of excel. Try opening the file in excel and
> save-as a new file paying attention to format (Excel 97 etc). Then try
> running your program on newly saved file.
> 
> > -----Original Message-----
> > From: Sara Uppalapati [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 24, 2007 11:28 PM
> > To: POI Users List
> > Cc: POI Users List
> > Subject: RE: Please help - unknown grbit '16'
> >
> > 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
> > [EMAIL PROTECTED]
> >
> >
> >
> > "Justin Warren" <[EMAIL PROTECTED]>
> > 04/24/2007 03:20 PM
> > Please respond to
> > "POI Users List" <[email protected]>
> >
> >
> > To
> > "POI Users List" <[email protected]>
> > 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:[EMAIL PROTECTED]
> > Sent: Tuesday, April 24, 2007 2:53 PM
> > To: [email protected]
> > 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: [EMAIL PROTECTED]
> > Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> > The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to