Because Cell A1 doesn't have formatting applied at the rich text string level.
> Then, i got an error here.
> CellReference b1 = new CellReference("A1");
> XSSFRow b1Row = sheet.getRow(b1.getRow());
> XSSFCell b1Cell = b1Row.getCell(b1.getCol());
> XSSFRichTextString value = b1Cell.getRichStringCellValue();
> XSSFFont b1Font = value.getFontAtIndex(0);
> System.out.println(b1Font.getBold()); //null pointer exception
Cell A1("img0") has formatting applied at the cell level. Cell B1(" Hello
Script...working properly1") has formatting applied at the rich text string
level.
See the API doc for details.
http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFRichTextString.html
Ryo Yamamoto
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]