Here is the result from BiffViewer: ============================================ Offset 0x0 (0)
java.lang.ArrayIndexOutOfBoundsException: 11 at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:529) at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:177) at org.apache.poi.hssf.record.BOFRecord.fillFields(BOFRecord.java:170) at org.apache.poi.hssf.record.Record.fillFields(Record.java:127) at org.apache.poi.hssf.record.Record.<init>(Record.java:92) at org.apache.poi.hssf.record.BOFRecord.<init>(BOFRecord.java:135) at org.apache.poi.hssf.dev.BiffViewer.createRecord(BiffViewer.java:310) at org.apache.poi.hssf.dev.BiffViewer.createRecords(BiffViewer.java:158) at org.apache.poi.hssf.dev.BiffViewer.run(BiffViewer.java:110) I'm not sure what that means? -----Original Message----- From: Andrew C. Oliver [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 14, 2006 3:06 PM To: POI Users List Subject: Re: Can't read SQL server generated excel file Probably can figure that out if you use BiffViewer. http://jakarta.apache.org/poi/hssf/hacking-hssf.html Wennberg, Mathias wrote: >Is there a way to check that? > >-----Original Message----- >From: Andrew C. Oliver [mailto:[EMAIL PROTECTED] >Sent: Tuesday, February 14, 2006 2:33 PM >To: POI Users List >Subject: Re: Can't read SQL server generated excel file > >It probably has pre excel 97 records in it. > >Wennberg, Mathias wrote: > > >>I checked that but it's in some type of binary format. >> >>-----Original Message----- >>From: Tracey Zellmann [mailto:[EMAIL PROTECTED] >>Sent: Tuesday, February 14, 2006 12:55 PM >>To: POI Users List >>Subject: Re: Can't read SQL server generated excel file >> >>I have had some similar problems. I found that the sql server was >>sending the file as a text file or an html file that excel was able to >>read. One clue is if when you look at it in Excel, the file name is >> >> >surrounded in quotes. > > >>Another way to check is to try to open the file, exactly as it comes >>from your customer, in a simple text program, like Notepad or TextPad. >>That let me see what the characters really were. If the file looks >>like html or if it is tab-delimited without any control characters, it >>is >> >> >not a "true" > > >>Excel file. >> >>In the end, I had to build a program to parse the text file into the >>data I wanted. >> >>----- Original Message ----- >>From: "Wennberg, Mathias" <[EMAIL PROTECTED]> >>To: <[email protected]> >>Sent: Tuesday, February 14, 2006 1:24 PM >>Subject: Can't read SQL server generated excel file >> >> >>We have a client that used to send us a manually created excel file (3 >>sheets, 3 columns each) that I was able to read without any problems. >>However, after they automated their process creating this excel file >>using SQL Server 2000 DTS Package (Excel version 2000) I'm not able to >>read >> >> >it. > > >>I've tried both poi-2.5.1-final-20040804.jar and >> >> >poi-2.0-final-20040126.jar. > > >>Error thrown is "Unable to construct record instance, the following >>exception >>occured: null". I get the same error on Windows 2000 and Linux. >>Code that throws the error: >>HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(myFile)); >> >>I found that if I open this file on my workstation, resize a column >>and save it, then I'm able to read it. This makes me believe that >>there is something "special" about the sql server generated excel file >>but unfortunately I don't have access to a sql server install so I >>can't play around with it. >> >>Anyone know what's going on? >> >>Thanks. >> >> >>--------------------------------------------------------------------- >>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/ >> >> >> >> > > >-- >Andrew C. Oliver >SuperLink Software, Inc. > >Java to Excel using POI >http://www.superlinksoftware.com/services/poi >Commercial support including features added/implemented, bugs fixed. > > >--------------------------------------------------------------------- >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/ > > > > -- Andrew C. Oliver SuperLink Software, Inc. Java to Excel using POI http://www.superlinksoftware.com/services/poi Commercial support including features added/implemented, bugs fixed. --------------------------------------------------------------------- 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/
