You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Lakshmi Prabha <la...@yahoo.com> on 2005/04/03 18:27:45 UTC
Partial string needs to be BOLD in HSSFCell
Hi ,
In an excel sheet (created using POI inteface),
I need to set the fontstyle (to be BOLD) of the
portion of the string displayed in the cell. I know we
can create the HSSFCellStyle and set its property as
follows,
HSSFFont boldFont = Workbook.createFont();
boldFont.setBoldweight(BOLDWEIGHT_BOLD);
HSSFCellStyle myStyle = Workbook.createCellStyle();
myStyle.setFont(boldFont);
// create a cell and asign values & style
cell.setCellStyle(myStyle);
cell.setCellValue("USER NAME : ABCD");
If I set like this, the entire string is displayed in
BOLD. Instead, I want only the "USER NAME" to be in
bold.
Any help would be appreciated,
Regards,
LP
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
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/
Re: Partial string needs to be BOLD in HSSFCell
Posted by an...@superlinksoftware.com.
We do not yet have Rich String Support (which is what you need).
Lakshmi Prabha wrote:
>Hi ,
>
>In an excel sheet (created using POI inteface),
>I need to set the fontstyle (to be BOLD) of the
>portion of the string displayed in the cell. I know we
>can create the HSSFCellStyle and set its property as
>follows,
>
>HSSFFont boldFont = Workbook.createFont();
>boldFont.setBoldweight(BOLDWEIGHT_BOLD);
>
>HSSFCellStyle myStyle = Workbook.createCellStyle();
>myStyle.setFont(boldFont);
>// create a cell and asign values & style
>cell.setCellStyle(myStyle);
>cell.setCellValue("USER NAME : ABCD");
>
>If I set like this, the entire string is displayed in
>BOLD. Instead, I want only the "USER NAME" to be in
>bold.
>
>Any help would be appreciated,
>Regards,
>LP
>
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>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/