From user-return-23423-archive-asf-public=cust-asf.ponee.io@poi.apache.org Wed May 15 12:17:43 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A8370180621 for ; Wed, 15 May 2019 14:17:42 +0200 (CEST) Received: (qmail 5105 invoked by uid 500); 15 May 2019 12:17:41 -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 5083 invoked by uid 99); 15 May 2019 12:17:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2019 12:17:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 80F6BC2C4E for ; Wed, 15 May 2019 12:17:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.285 X-Spam-Level: ** X-Spam-Status: No, score=2.285 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id eXXZ8Lv-sz9f for ; Wed, 15 May 2019 12:17:37 +0000 (UTC) Received: from n5.nabble.com (n5.nabble.com [162.253.133.81]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 43E126117A for ; Wed, 15 May 2019 12:17:37 +0000 (UTC) Received: from n5.nabble.com (localhost [127.0.0.1]) by n5.nabble.com (Postfix) with ESMTP id BAAD3E027A4F for ; Wed, 15 May 2019 05:17:36 -0700 (MST) Date: Wed, 15 May 2019 05:17:36 -0700 (MST) From: rdhanara To: user@poi.apache.org Message-ID: <1557922656762-0.post@n5.nabble.com> In-Reply-To: <1557922183186-0.post@n5.nabble.com> References: <1557918527464-0.post@n5.nabble.com> <1557922183186-0.post@n5.nabble.com> Subject: Re: sheet.removeMergedRegion throwing Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit But if you notice clearly int totalMergedRegions=sheet.getNumMergedRegions(); for (int i = 0; i < totalMergedRegions; i++){ sheet.removeMergedRegion(i); } totalMergedRegions will not reduce hence array wont get smaller . Any other suggestions please let me know . Thanks...! -- Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org