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 58A726396 for ; Wed, 1 Jun 2011 15:01:53 +0000 (UTC) Received: (qmail 59530 invoked by uid 500); 1 Jun 2011 15:01:52 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 59508 invoked by uid 500); 1 Jun 2011 15:01:52 -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 59500 invoked by uid 99); 1 Jun 2011 15:01:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 15:01:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave2wave@comcast.net designates 76.96.30.17 as permitted sender) Received: from [76.96.30.17] (HELO qmta10.emeryville.ca.mail.comcast.net) (76.96.30.17) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 15:01:44 +0000 Received: from omta21.emeryville.ca.mail.comcast.net ([76.96.30.88]) by qmta10.emeryville.ca.mail.comcast.net with comcast id qeo81g0081u4NiLAAf1N5C; Wed, 01 Jun 2011 15:01:22 +0000 Received: from [192.168.1.9] ([67.180.51.144]) by omta21.emeryville.ca.mail.comcast.net with comcast id qf0v1g00o36gVt78hf1EDY; Wed, 01 Jun 2011 15:01:19 +0000 Subject: Re: [Excel- Blank/Empty Cell] Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Dave Fisher In-Reply-To: Date: Wed, 1 Jun 2011 08:00:54 -0700 Cc: hamza.abdelkebir@gmail.com Content-Transfer-Encoding: quoted-printable Message-Id: <3241FF0A-CCA4-4C45-B358-A9618BE5470E@comcast.net> References: To: "POI Users List" X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org Hi - Look for MissingCellPolicy and set it according to your needs. Regards, Dave On Jun 1, 2011, at 4:48 AM, rahul.soa wrote: > Hi Hamza, >=20 > Thanks for your email. >=20 > It did not really work for me. >=20 > for (HSSFRow row =3D (HSSFRow) rows.next(); rows.hasNext(); row =3D > (HSSFRow) rows.next()) { > Iterator cells =3D row.cellIterator(); > for (HSSFCell cell =3D (HSSFCell) cells.next(); = cells.hasNext(); > cell =3D (HSSFCell) cells.next()) { > } >=20 > I think [ cell =3D (HSSFCell) cells.next()) ] "cell" does not consider > blank/empty cell in the sheet so > cell.getStringCellValue().compareTo("") did not work for me. >=20 > Now my requirement has changed, so changed my program accordingly. >=20 > Rahul >=20 > On Tue, May 31, 2011 at 2:24 PM, Hamza Abdelkebir > wrote: >> Hello, >> You could maybe try testing like this >>=20 >> cell.getStringCellValue().compareTo(""); >>=20 >> Not sure this workds though, >>=20 >> Regards, >> -- >> Hamza >>=20 >>=20 >>=20 >>=20 >> On Tue, May 31, 2011 at 2:20 PM, rahul.soa = wrote: >>=20 >>> Hello Users, Devs, >>>=20 >>> Sorry for asking a common question as I could not find the exact >>> answer, how to find a cell which is blank/empty (cell does not have >>> any value). Is there a way to know this? I have several rows of data >>> in xls file where in each row one or more cells are blank/empty. In = my >>> program I would like to consider those blank/empty cells. >>>=20 >>> Many Thanks, >>> Rahul >>>=20 >>> = --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org >>> For additional commands, e-mail: user-help@poi.apache.org >>>=20 >>>=20 >>=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org > For additional commands, e-mail: user-help@poi.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org