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:[EMAIL PROTECTED]
> Gesendet: Dienstag, 29. November 2005 09:34
> An: [email protected]
> 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: [EMAIL PROTECTED]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to