Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 80221 invoked from network); 12 Jul 2006 07:31:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2006 07:31:06 -0000 Received: (qmail 30089 invoked by uid 500); 12 Jul 2006 07:31:03 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 30076 invoked by uid 500); 12 Jul 2006 07:31:03 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 30065 invoked by uid 99); 12 Jul 2006 07:31:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 00:31:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.110.62.81] (HELO rewemta01.rewe.de) (217.110.62.81) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 00:31:01 -0700 Received: from S-KOEZ1-02.koeln.ads.risnet.de (s-koez1-02.koeln.ads.risnet.de [10.64.228.218]) by rewemta01.rewe.de (Switch-3.1.8/Switch-3.1.7) with ESMTP id k6C7Ubrs005605 for ; Wed, 12 Jul 2006 09:30:37 +0200 Received: from S-KOEZ1-02 (localhost [127.0.0.1]) by S-KOEZ1-02.koeln.ads.risnet.de (Postfix) with ESMTP id AD873B4CD for ; Wed, 12 Jul 2006 09:30:37 +0200 (CEST) Received: from rewemta03.eil.risnet.de (unknown [10.64.250.43]) by S-KOEZ1-02.koeln.ads.risnet.de (Postfix) with ESMTP id 75C64B51A for ; Wed, 12 Jul 2006 09:30:37 +0200 (CEST) Received: from s-koew3-smtp2.koeln.ads.risnet.de (s-koew3-smtp2.koeln.ads.risnet.de [10.64.228.203]) by rewemta03.eil.risnet.de (Switch-3.1.7/Switch-3.1.7) with ESMTP id k6C7Ua6N028131 for ; Wed, 12 Jul 2006 09:30:36 +0200 Received: by s-koew3-smtp2.koeln.ads.risnet.de with Internet Mail Service (5.5.2657.72) id <3Y2ZYJX0>; Wed, 12 Jul 2006 09:30:36 +0200 Message-ID: From: "Marx, Stefan ext. MA Fa. Lynx" To: "'POI Users List'" Subject: AW: numeric cell type Date: Wed, 12 Jul 2006 09:30:33 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-TBoneOriginalFrom: "Marx, Stefan ext. MA Fa. Lynx" X-TBoneOriginalTo: "'POI Users List'" X-TBoneDomainSigned: false X-Rewe-Scanned: 1 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Abhinav, in this area I encountered similar problems. Due to other circumstances = I can't switch to the solution to proceed each numeric value with a ', so = I ended up in this work-a-round: [..] final int cellType =3D cell.getCellType(); if (cellType =3D=3D HSSFCell.CELL_TYPE_NUMERIC) { mydouble =3D new = Double(cell.getNumericCellValue()); } else if (cellType =3D=3D = HSSFCell.CELL_TYPE_STRING) { myString =3D cell.getStringCellValue(); mydouble =3D parseStringVal(myString); } [..] May be this solution is worth to consider for your problem. Greetings from Cologne, Germany, cu Stefan Stefan Marx Marx Consulting (extern) REWE GROUP=20 Gesch=E4ftsbereich Konzern-Systeme Funktionsbereich Business-Systeme REWE-Informations-Systeme GmbH Humboldtstra=DFe 140-144 - 51149 K=F6ln Telefon: +49 (0)221 149 - 5953 Telefax: +49 (0)221 149 - 97 5953 E-Mail: Stefan.Marxext.MAFa.Lynx@rewe-group.com www.rewe-group.com > -----Urspr=FCngliche Nachricht----- > Von: Abhinav Srivastava [SMTP:wri2me@gmail.com] > Gesendet am: Mittwoch, 12. Juli 2006 02:28 > An: poi-user@jakarta.apache.org > Betreff: numeric cell type >=20 > While reading a XLS using HSSF, cells which contain numbers > are being returned as type NUMERIC. e.g a cell having 2 would have = its > value returned as 2.0 (double) and not as "2" as I would like it to. > any help? --------------------------------------------------------------------- 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/