poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swati, Singhal (IE10)" <Swati.Sing...@honeywell.com>
Subject RE: Reading a Date
Date Mon, 17 Nov 2003 09:37:05 GMT
Hey,

Thanks!
But i still have a question. I have a switch-case which evaluates the cell
type & then passes control to the appropriate case...for numeric, String,
blank, boolean etc.

But in case of a Date, since it will be Numeric (Cell type = 0), then how
will i know whether the data is a Date or a number?
Because i need to format it accordingly.

Regards,
Swati

-----Original Message-----
From: Karl-Heinz Zengerle [mailto:karl-heinz.zengerle@sawag.com]
Sent: Monday, November 17, 2003 2:54 PM
To: 'POI Users List'
Subject: AW: Reading a Date


Hi Swati.

Dates come as numeric data. You've methods like getDateCellValue() (class
HSSFCell) and HSSFDateUtil.isCellDateFormatted() and
HSSFDateUtil.isValidExcelDate() to read it as a date or to check whether
it's date formatted.

Regards,

Karl-Heinz Zengerle.


-----Urspr√ľngliche Nachricht-----
Von: Swati, Singhal (IE10) [mailto:Swati.Singhal@honeywell.com]
Gesendet: Montag, 17. November 2003 10:21
An: poi-user@jakarta.apache.org
Betreff: Reading a Date


Hello,

How do i read a Date from an excel file??

Do i need to use DataFormat for that??
But how does my program know it's reading a Date from a particular cell??

Regards,
Swati


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


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

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


Mime
View raw message