Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 75268 invoked from network); 1 Jul 2004 15:18:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Jul 2004 15:18:01 -0000 Received: (qmail 61755 invoked by uid 500); 1 Jul 2004 15:17:57 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 61690 invoked by uid 500); 1 Jul 2004 15:17:56 -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 61642 invoked by uid 99); 1 Jul 2004 15:17:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [62.138.38.84] (HELO slox.sawag.com) (62.138.38.84) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 01 Jul 2004 08:17:55 -0700 Received: by slox.sawag.com (Postfix, from userid 65534) id B9A63B799B; Thu, 1 Jul 2004 17:17:21 +0200 (CEST) Received: from apollo.sawag.com (apollo.sawag.com [62.138.38.84]) by slox.sawag.com (Postfix) with ESMTP id 11F0FB798D for ; Thu, 1 Jul 2004 17:17:20 +0200 (CEST) Message-ID: <2380520.1088695040071.SLOX.WebMail.wwwrun@apollo.sawag.com> Date: Thu, 1 Jul 2004 17:17:20 +0200 (CEST) From: Karl-Heinz Zengerle To: POI Users List Subject: Re: HSSFSheet.removeRow() In-Reply-To: <20040701151551.45710.qmail@web52609.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Priority: 3 (normal) X-Mailer: SuSE Linux Openexchange Server 4 - WebMail (Build 2.3824) X-Operating-System: Linux 2.4.21-215-athlon i386 (JVM 1.3.1_04) Organization: SAW AG References: <20040701151551.45710.qmail@web52609.mail.yahoo.com> X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on apollo.sawag.com X-Spam-Level: X-Spam-Status: No, hits=-104.5 required=5.0 tests=AWL,BAYES_00, REMOVE_REMOVAL_NEAR,USER_IN_WHITELIST autolearn=no version=2.61 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Davinder. Indexes start at 0. So typically a none value is expressed by a negative value. So it's nothing strange. Regards, Karl-Heinz. Am Do 01.07.2004 17:15 schrieb Davinder Kohli : > In a sheet containing 65536 rows, I invoked removeRow, > after all rows were removed the lastRowNum and > firstRowNum were both set to -1. Shouldn't both these > be set to 0? > > HSSFSheet sheet = m_workbook.getSheet(sheetName); > // get the last row num > int lastRowNum = sheet.getLastRowNum(); > // lastRowNum returns 65535 > for (int i = 0; i < lastRowNum +1; i++) > { > // get the row and remove it > sheet.removeRow(sheet.getRow(i)); > } > > > > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - 100MB free storage! > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > 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