Hi Swati. I was also wondering before I was discovering that. Sometimes the things in the JavaDoc are a bit hidden. A "see also" part in the docs could help.
Regards, Karl-Heinz. -----Urspr�ngliche Nachricht----- Von: Swati, Singhal (IE10) [mailto:[EMAIL PROTECTED] Gesendet: Montag, 17. November 2003 10:42 An: POI Users List Betreff: RE: Reading a Date Oops, thanks a lot! Regards, Swati -----Original Message----- From: Karl-Heinz Zengerle [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 3:04 PM To: 'POI Users List' Subject: AW: Reading a Date Hi Swati. It was already mentioned: HSSFDateUtil.isCellDateFormatted() So you've a switch() which has to decide in the numeric case whether it's a number or a date. Regards, Karl-Heinz. -----Urspr�ngliche Nachricht----- Von: Swati, Singhal (IE10) [mailto:[EMAIL PROTECTED] Gesendet: Montag, 17. November 2003 10:37 An: POI Users List Betreff: RE: Reading a Date 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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] Gesendet: Montag, 17. November 2003 10:21 An: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
