Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 34131 invoked from network); 17 Nov 2003 09:40:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Nov 2003 09:40:36 -0000 Received: (qmail 20367 invoked by uid 500); 17 Nov 2003 09:40:06 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 20348 invoked by uid 500); 17 Nov 2003 09:40:06 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "POI Users List" Reply-To: "POI Users List" Delivered-To: mailing list poi-user@jakarta.apache.org Received: (qmail 20243 invoked from network); 17 Nov 2003 09:40:05 -0000 Received: from unknown (HELO slox.sawag.com) (62.138.38.84) by daedalus.apache.org with SMTP; 17 Nov 2003 09:40:05 -0000 Received: by slox.sawag.com (Postfix, from userid 65534) id 1EC2511BBC; Mon, 17 Nov 2003 10:38:29 +0100 (CET) Received: from karlheinz (dsl.sawag.com [62.138.17.46]) by slox.sawag.com (Postfix) with ESMTP id 5BA4F119EC for ; Mon, 17 Nov 2003 10:37:57 +0100 (CET) From: "Karl-Heinz Zengerle" To: "'POI Users List'" Subject: AW: Reading a Date Date: Mon, 17 Nov 2003 10:40:50 +0100 Message-ID: <001201c3acee$e325b900$4100000a@karlheinz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 In-Reply-To: <77ED2BF75D59D1439F90412CC5B109740437306C@ie10-sahara.hiso.honeywell.com> X-Spam-Status: No, hits=-92.6 required=5.0 tests=AWL,IN_REP_TO,ORIGINAL_MESSAGE,USER_IN_WHITELIST version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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:Swati.Singhal@honeywell.com] 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:karl-heinz.zengerle@sawag.com] 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:Swati.Singhal@honeywell.com] 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: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 --------------------------------------------------------------------- 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