You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by David Holtzhouser <da...@yahoo.com> on 2004/08/25 17:56:17 UTC

How to get cell value defined as Date using Event API

I'm using the Event API to read an Excel sheet, but
am having trouble figuring out which subclass of
Record
to use in order to catch a cell value formatted as a
Date.  

So, given this code:
        public void processRecord(Record record)
        {
                switch (record.getSid())
                {
                        case NumberRecord.sid :
                                NumberRecord numrec =
(NumberRecord) record;

                                System.out.println(
                                        "Cell found
with value "
                                                +
numrec.getValue()
                                                + " at
row "
                                                +
numrec.getRow()
                                                + "
and column "
                                                +
numrec.getColumn());
                }
        } //END processRecord

A date formatted cell value should be printed out to
stdout?  I'm working off the example in the
\src\org\apache\poi\hssf\usermodel\examples package of
how to use the Event API.

What I currently get from this code doesn't include
cells formatted as Dates.

Can someone please clue me in...

 
Thanks, 

Dave


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org