You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jw...@dicarta.com on 2006/03/08 20:55:02 UTC

HSSF SeriesTextRecord not included in RecordFactory?

I am getting a class cast exception on the following in my listener:

                case SeriesTextRecord.sid:
                    String text = (SeriesTextRecord) record.getText();

When I prepend the case statement with the following:
            if (record instanceof UnknownRecord) {
                UnknownRecord ur = (UnknownRecord) record;
                System.out.println("Excel extractor can't handle record
type "+ur.getSid());
                return;
            }

I get a lot of:
Excel extractor can't handle record type 4109

Which is the sid for SeriesTextRecord.  Looking at
org.apache.poi.hssf.record.RecordFactory, SeriesTextRecord.class is
included in neither of the lists.  Should it be?

Jeff Wang
diCarta, Inc.

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


Re: HSSF SeriesTextRecord not included in RecordFactory?

Posted by "Andrew C. Oliver" <ac...@apache.org>.
jwang@dicarta.com wrote:
> I am getting a class cast exception on the following in my listener:
> 
>                 case SeriesTextRecord.sid:
>                     String text = (SeriesTextRecord) record.getText();

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

     case SeriesTextRecord.sid:
        String text = ((SeriesTextRecord)record).getText();


> 
> When I prepend the case statement with the following:
>             if (record instanceof UnknownRecord) {
>                 UnknownRecord ur = (UnknownRecord) record;
>                 System.out.println("Excel extractor can't handle record
> type "+ur.getSid());
>                 return;
>             }
> 
> I get a lot of:
> Excel extractor can't handle record type 4109
> 
> Which is the sid for SeriesTextRecord.  Looking at
> org.apache.poi.hssf.record.RecordFactory, SeriesTextRecord.class is
> included in neither of the lists.  Should it be?
> 
> Jeff Wang
> diCarta, Inc.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> 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: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/