You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by ja...@lhsystems.com on 2008/04/04 17:00:21 UTC

Hi there!

 

I need to create an Excel spreadsheet where in one cell there could be
different formatting styles, i.e. let the phrase be

 

"Hey Gary! Please change the amount from $100 to $80. Regards, Jan".

 

The word "amount" is underlined, "$100" has a yellow background and
"$80" is printed in red. Now doing that in MS Excel is possible, and so
it is in Gnumeric, but I need to do it via XSL. There is the ValueFormat
attribute of <gmr:Cell>, and Gnumeric fills it for example with
"@[bold=1:0:9][bold=0:9:61][underline=single:9:61][color=ffx00x00:24:61]
", but it doesn't seem to work when I put it into my Stylesheet. Will
the functionality be developed in the future or is there a reason why
it's not implemented so far?

 

Thanks and Best Regards,

 

Jan
 
Sitz der Gesellschaft / Corporate Headquarters:
Lufthansa Systems Airline Services GmbH, Kelsterbach
Registereintragung / Registration:
Amtsgericht Darmstadt 83849
 
Geschaeftsfuehrung/ Management:
Dr. Ulrike Gall
Robert Viertel

Re:

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 4 Apr 2008, jan.tams@lhsystems.com wrote:
> I need to create an Excel spreadsheet where in one cell there could be 
> different formatting styles, i.e. let the phrase be

The string contents of cells are actually HSSFRichTextStrings. You can 
style these however you want

http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html#getRichStringCellValue()
http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFRichTextString.html

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org