Hay Julien and Andrew, Thanks a lot for quick help! Tan. KiLiCoOl <[EMAIL PROTECTED]> wrote: HSSFCell cell = row.createCell((short)0); cell.setCellValue("XXX"); HSSFCellStyle cellStyle = wb.createCellStyle(); HSSFFont font = wb.createFont(); font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); cellStyle.setFont(font); cell.setCellStyle(cellStyle);
Best regards, Julien On Wed, 6 Oct 2004 05:37:32 -0700 (PDT), Tanmay Sinha wrote: > Folks, > > I am new to POI and found it really great. In no time I could write / read to > spreadsheets, but not finding suitable method for seeting text as BOLD. > > Can some one please tell me ? > > Font, alignment etc I was able to do using ..... > createCell(wb, row, (short) i, HSSFCellStyle.ALIGN_CENTER, col_name); > > private static void createCell(HSSFWorkbook wb, HSSFRow row, short column, short > align, String text) > { > HSSFCell cell = row.createCell(column); > cell.setCellValue(text); > HSSFCellStyle cellStyle = wb.createCellStyle(); > cellStyle.setAlignment(align); > //cellStyle.setWrapText(true); > cell.setCellStyle(cellStyle); > } > > Regards, > Tan. > > > --------------------------------- > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile phone. > -- *´¨ ) ¸.•´¸.•´¨) ¸.•*¨) (¸.•´ KiLiCoOl (¸.•´ (´¸.•*´¯`*•> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone.