Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 33982 invoked from network); 3 Dec 2005 11:17:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Dec 2005 11:17:14 -0000 Received: (qmail 63059 invoked by uid 500); 3 Dec 2005 11:17:10 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 63008 invoked by uid 500); 3 Dec 2005 11:17:09 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 62980 invoked by uid 99); 3 Dec 2005 11:17:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2005 03:17:09 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.85.27] (HELO web36610.mail.mud.yahoo.com) (209.191.85.27) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 03 Dec 2005 03:18:37 -0800 Received: (qmail 69756 invoked by uid 60001); 3 Dec 2005 11:16:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Dz33G5yNa2GldoW0Hck336vKQnL1AAjfvLyd5HYXuZab3r6+QoAFaKGrj4Rz9vlmwfY0hQk3dUJsKQRDswY5wnL2s16LxI+jnIkapxJq8L+73X+m0zJnRZ735lucIsgXD6NPlYS3lzdKO484ZKwIA2uW2cJ/kQe9jEEm5I5Rg0o= ; Message-ID: <20051203111647.69754.qmail@web36610.mail.mud.yahoo.com> Received: from [86.136.33.18] by web36610.mail.mud.yahoo.com via HTTP; Sat, 03 Dec 2005 03:16:47 PST Date: Sat, 3 Dec 2005 03:16:47 -0800 (PST) From: Anthony Andrews Subject: Re: 2 Fonts in 1 Cell - ByteArrayInputStream To: POI Users List , Christian Gosch In-Reply-To: <003e01c5f767$36633290$2001a8c0@cg2> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Christian Must admit I did not quite believe it myself but you can indeed set two - or more - fonts on a single string in one cell. But I think that you face one huge problem. I could be wrong but I think that HSSF uses the Excel97 format as standard and as you indicate below, it may only be possible to use two fonts in one cell in Excel versions 2000 on. --- Christian Gosch wrote: > Actually it does, depending on the version (should > be Excel2000 or newer). > Look on the attachment "multifontexample.xls", if it > is still there. > > Regards > Christian Gosch > inovex GmbH > > > On Friday, December 02, 2005 10:45 AM [GMT+1=CET], > Tobias Meyer wrote: > > > AFAIK Excel does not support two fonts in one > cell. Try doing thin in > > excel itself... > > > > As "workaround" (maybe it's cleaner anyways...) > try settung your > > Cell's encoding to UTF-16 and use the Unicode > character \u2211 (Sum) > > or maybe the Greek Sigma \u03A3, if the Sum Symbol > is not in your > > Font. > > > > i.e.: > > > > HSSFCell cell = row.createCell(x); > > cell.setEncoding(HSSFCell.ENCODING_UTF_16); > > cell.setCellValue("\u2211 "+yourStringHere); // > Sum sign + your text > > > > See: > > > > http://www.unicode.org/charts/ for a definition of > the unicode > > characters, and > > http://www.unicode.org/charts/PDF/U2200.pdf for a > whole bunch of > > mathematical symbols. > > > > A Pitfall with this attempt may be that not all > fonts support all > > characters - but it is well worth a try... > > > > For a general introduction to Unicode I recommend: > > > http://www.joelonsoftware.com/articles/Unicode.html > > (Do you know the difference between Unicode, UTF-8 > and UTF-16 ? ;-) > > > > Hth, > > Tobias > > > > > >> -----Urspr�ngliche Nachricht----- > >> Von: smashy [mailto:smashy@programmer.net] > >> Gesendet: Dienstag, 29. November 2005 09:34 > >> An: poi-user@jakarta.apache.org > >> Betreff: 2 Fonts in 1 Cell - ByteArrayInputStream > >> > >> > >> Hi, > >> > >> is it possible to use 2 different Font typs > (Arial , Symbol) > >> in one Excel cell? > >> I use a ByteArrayInputStream from Oracle DB to > create a HSSF > >> workbook. This > >> stream contained the whole workbook with cells > which switch > >> the Fonts. After > >> creating the HSSFWorkbook my cells shwoing only > one Font. > >> Why? Waht can i do if > >> i need tow font per cell? I need the "Summ" > Symbol from the > >> Symbol FontSet. > >> > >> THX! > >> > >> IKT - http://kickme.to/smashy > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: > poi-user-unsubscribe@jakarta.apache.org > >> Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > >> The Apache Jakarta Poi Project: > http://jakarta.apache.org/poi/ > >> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > poi-user-unsubscribe@jakarta.apache.org > > Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: > http://jakarta.apache.org/poi/ > > Gruesse, > -- > Dipl.-Inform. Christian Gosch > Systems Development > inovex GmbH > Karlsruher Strasse 71 > D-75179 Pforzheim > Tel.: +49 (0)72 31 - 31 91 - 85 > Fax: +49 (0)72 31 - 31 91 - 91 > mailto:c.gosch@inovex.de > http://www.inovex.de > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > poi-user-unsubscribe@jakarta.apache.org > Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs --------------------------------------------------------------------- To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/