Reputation: 105
Am using poi3.7 to create xlsx, its looking fine with openoffice but bold font not support in entire ms excel 2007 and 2010. its partially looking bold
style = objWorkbook.createCellStyle();
font = objWorkbook.createFont();
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
style.setFont(font);
objHSSFCell.setCellValue(new HSSFRichTextString(value));
objHSSFCell.setCellStyle(style);
pls give your suggestion to resolve this, thanks in advance.
Upvotes: 1
Views: 273
Reputation: 8617
Upgrading comment to an answer;
Seems you are using HSSF
instead of XSSF
for xlsx. Hence, though HSSFRichTextString
is valid for an HSSFCell
, you need XSSFCell
instead and then set its value with XSSFRichTextString
.
Upvotes: 2