I'm upgrading from POI 3.15 to 3.17
This code does not compile:
HSSFFont fontTitle = wb.createFont();
fontTitle.setFontHeightInPoints((short) 12);
fontTitle.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
I've changed to:
Font fontTitle = wb.createFont();
fontTitle.setFontHeightInPoints((short) 12);
fontTitle.setBoldweight(Font.BOLDWEIGHT_BOLD);
but still in error:
/excel/SQL2XLSX17N.java:271: cannot find symbol
symbol : variable BOLDWEIGHT_BOLD
location: interface org.apache.poi.ss.usermodel.Font
fontTitle.setBoldweight(Font.BOLDWEIGHT_BOLD);
How do I use a bold font?
Use Font.setBold(true)
to embolden.
Signature:
void setBold(boolean bold)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With