setLineStyleColor on a comment is not working. See the following code. Added setLineStyle to the sample for creating Comments. http://poi.apache.org/hssf/quick-guide.html HSSFComment comment2 = patr.createComment(new HSSFClientAnchor(0, 0, 0, 0, (short)4, 8, (short) 6, 11)); //modify background color of the comment comment2.setFillColor(204, 236, 255); HSSFRichTextString string = new HSSFRichTextString("Normal body temperature"); //apply custom font to the text in the comment HSSFFont font = wb.createFont(); font.setFontName("Arial"); font.setFontHeightInPoints((short)10); font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); font.setColor(HSSFColor.RED.index); string.applyFont(font); comment2.setString(string); //by default comments are hidden. This one is always visible. comment2.setVisible(true); comment2.setAuthor("Bill Gates"); comment2.setLineStyle(HSSFTextbox.LINESTYLE_DOTGEL); comment2.setLineStyleColor(255,0,10); /** * The second way to assign comment to a cell is to implicitly specify its row and column. * Note, it is possible to set row and column of a non-existing cell. * It works, the commnet is visible. */ comment2.setRow(6); comment2.setColumn((short)1);
This problem should be fixed in trunk. Please try with a nightly build - see download links on http://poi.apache.org/ or build yourself from SVN trunk, see http://poi.apache.org/subversion.html