Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 28688 invoked from network); 19 Jun 2007 21:38:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 21:38:25 -0000 Received: (qmail 45192 invoked by uid 500); 19 Jun 2007 21:38:26 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 45181 invoked by uid 500); 19 Jun 2007 21:38:26 -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 45171 invoked by uid 99); 19 Jun 2007 21:38:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 14:38:26 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=NO_REAL_NAME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of rcote@ebi.ac.uk designates 193.62.196.100 as permitted sender) Received: from [193.62.196.100] (HELO maui.ebi.ac.uk) (193.62.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 14:38:22 -0700 Received: from webmail.ebi.ac.uk (sysweb4.ebi.ac.uk [172.18.1.72]) by maui.ebi.ac.uk (8.11.7+Sun/8.11.7) with ESMTP id l5JLbwQ24931 for ; Tue, 19 Jun 2007 22:37:58 +0100 (BST) Received: from dyn-62-56-118-77.dslaccess.co.uk ([62.56.118.77]) (SquirrelMail authenticated user rcote) by webmail.ebi.ac.uk with HTTP; Tue, 19 Jun 2007 22:37:58 +0100 (BST) Message-ID: <45358.62.56.118.77.1182289078.squirrel@webmail.ebi.ac.uk> In-Reply-To: <5a59da2e7f47b54b9ce12a2c8bcb7ad7@mac.com> References: <46781127.6060101@ebi.ac.uk> <5a59da2e7f47b54b9ce12a2c8bcb7ad7@mac.com> Date: Tue, 19 Jun 2007 22:37:58 +0100 (BST) Subject: Re: HSSFRichTextString.applyFont causing MS Excel to run out of memory From: rcote@ebi.ac.uk To: "POI Users List" User-Agent: SquirrelMail/1.4.6-1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org On Tue, June 19, 2007 8:41 pm, Henry Martin wrote: >> The problem comes with this last bit of code, when I call >> hssfTextString.applyFont(). I tried a small test set of data (5 rows, >> each cell having two or three data items to be processed). It worked >> perfectly. I then tried it with a production test set (3500 rows, each >> cell having 4-5 data items). That's when I found that MS Excel could >> no longer open the document > > Can you partition the production test set to find out if it is a > specific row causing the problem ( either by controlling the source of > data or by counting rows in your code )? A particularly simple test > might be to use only the first 5 rows from the production test set. I can, but I have the feeling that's not the issue. I'm thinking object creation is the problem. I've tried googling the problem and from what I could find that was reasonably close, it seems that every time you create an HSSFRichTextString and modify it in some way by applying styles and fonts, it seems that a new object is created in a shared string area. This means that if I modify a given cell content a few times with various substrings, it's creating a whole lot of orphaned SSTs that, to the best of my knowledge, are not cleaned up. This is purely a wag on my part, but if that's the problem, I don't know how to get around it. Anyway, I can try it and post the original xls file (without colors), the production file (broken, with colors) and a version that has been saved by OpenOffice on my work website tomorrow if anybody wants to have a better look. I appreciate any pointer or comment :) Cheers, Rc -- Richard Cote Software Engineer - PRIDE Project Team (Sequence Database Group) European Bioinformatics Institute Wellcome Trust Genome Campus RCote@ebi.ac.uk Hinxton Cambridge CB10 1SD Phone: (+44) 1223 492610 United Kingdom Fax : (+44) 1223 494468 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org