Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C090416A for ; Sat, 4 Jun 2011 03:08:40 +0000 (UTC) Received: (qmail 34900 invoked by uid 500); 4 Jun 2011 03:08:39 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 34770 invoked by uid 500); 4 Jun 2011 03:08:39 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 34744 invoked by uid 99); 4 Jun 2011 03:08:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2011 03:08:37 +0000 X-ASF-Spam-Status: No, hits=3.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.138.91.41] (HELO nm12-vm1.bullet.mail.ne1.yahoo.com) (98.138.91.41) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 04 Jun 2011 03:08:28 +0000 Received: from [98.138.90.57] by nm12.bullet.mail.ne1.yahoo.com with NNFMP; 04 Jun 2011 03:08:07 -0000 Received: from [98.138.89.193] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 04 Jun 2011 03:08:07 -0000 Received: from [127.0.0.1] by omp1051.mail.ne1.yahoo.com with NNFMP; 04 Jun 2011 03:08:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 39016.25320.bm@omp1051.mail.ne1.yahoo.com Received: (qmail 503 invoked by uid 60001); 4 Jun 2011 03:08:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1307156886; bh=ATXTm3kuQuUTS4hTFGWx6bfJ2pBOeEf7+Trn17IwZpY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=QmY4DdRY+fc8zGpK0EgzaHjM+lXFLlOcR1Onbr/b1tNn7PLJrRp8gNT8wJo0QKNelUYyQVRT3s26T0rI+aeCgHQgjKniIlu1Fe6nq5kBxsqHPzNcSUfCGfGZBymxdDjT6hzXb8XrKYvsBjDW+se/W5oT19mkZgEAPZ70colmgc4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=aE54EWCELfu20VM3TTw/zs4Fhwy+LB1pYlw4nFcTzULBh/jcQvfT+mDfUJVBLsibmwx3/iadxrSD7hC9m6EiItwssxTgTlPPPOX9D+6bF3MVBXCZQ16eLUh3i7IBfxj0JG8rRIWHFtgyRRuaBZRRVX9DRcN7H4AsUwVkASymRFc=; Message-ID: <282085.84003.qm@web113608.mail.gq1.yahoo.com> X-YMail-OSG: rxCn2y8VM1n7a2BXakQ7S5x_R9szNX4Vy2JNrIYLK357z32 GaNDSxJcd8Cr.n5ujhnVJcZ7Qyj7BYpvK6S2qCHaq8I_9NE9Hee1IqD12ULt y66Hegnhk11J2_9slbyE0doLfh2pgsFbBUNnrUyAzHwnqSUoyDp61MXs50t2 EQWNvSprKxYJzNppQCD6jR14J_HUDhU_U9DGunZdNdLoFLVvxqhLaQ7SMKHo vzgYHusNYzWYnCm4K3kvRzP4aT1SDvIqkCP4m6NRst0fFdGwIX6p8oTEuEd2 aqNtYws_fS667LSCc.S2rj4i8d0MTdnLs8qlZayHmHmIbobUMaWntC5pYZ3. 89AkGmX5sW2UjeOdhmq.hXnfIH1OcVEDNeN_ea4YAw6AihAIyNds8hjwQ4Pj FJhA8kSAsLFPhsRaZ_9IaQyW7q67QMXyv8jASDueYqf4XCNZIivz491ue7mV mTsS89qy20Uw8F3tmPO9x2XyvUWn3cIUJdKWPfkYDkAVMEh8Lk3AF7AY43vk icYRYvULiXZU3z0Z47wOk9pe_yuo8kbYCurnXy637nWMOtbkpzH2K7XoPT8h 22Hp8Quko2ZL3UWo0.d5imAM2FsRU4.VEcqKhLqlvHnVNveZw5mAi7YwNWDF AHfFsVXqA.FdujXceRYMZspgQoc0RRp0R3XxEFGEzz1pAJopgAafJxlutLg- - Received: from [184.96.169.222] by web113608.mail.gq1.yahoo.com via HTTP; Fri, 03 Jun 2011 20:08:05 PDT X-Mailer: YahooMailRC/570 YahooMailWebService/0.8.111.304355 References: <1307137677204-4452662.post@n5.nabble.com> Date: Fri, 3 Jun 2011 20:08:05 -0700 (PDT) From: Jon Svede Subject: Re: Getting Decimal Instead of Text String To: POI Users List In-Reply-To: <1307137677204-4452662.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1751138278-1307156885=:84003" X-Virus-Checked: Checked by ClamAV on apache.org --0-1751138278-1307156885=:84003 Content-Type: text/plain; charset=us-ascii Nick Burch posted this on the dev mailing list and I think it might apply here, too: "You probably just want to apply the formatting rules to the cell when you extract it. org.apache.poi.ss.usermodel.DataFormatter should help here". Though I may be wrong so take it with a grain of salt.... HTH, Jon ________________________________ From: eugenebalt To: user@poi.apache.org Sent: Fri, June 3, 2011 3:47:57 PM Subject: Getting Decimal Instead of Text String I am using Apache POI-HSSF for working with Excel files. I have a cell in my spreadsheet that looks like "115". I verified that it is formatted as "Text" (Format Cells -> Text). However, when I read it in as row.getCell(0).toString() I get this string: "115.0" This is incorrect. I should be getting "115" since it's explicitly formatted as Text. How can I get the desired result? The cell can be anything, numbers or characters, and I expect the same string as in the cell. Thanks -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Getting-Decimal-Instead-of-Text-String-tp4452662p4452662.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org --0-1751138278-1307156885=:84003--