poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lakshmi Prabha <lakshmi...@yahoo.com>
Subject Partial string needs to be BOLD in HSSFCell
Date Sun, 03 Apr 2005 16:27:45 GMT
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/


Mime
View raw message