Could someone please explain to me how to properly use the Anchors when creating cell comments? Mine were working, but the spread sheet changed and I am having issues getting my cell comments to appear. This is the code I was using that worked:
Comment c = drawing.createCellComment (new HSSFClientAnchor(0, 0, 0, 0, (short)4, 2, (short)6, 5));
That was found mostly by experimenting around. Looking at the api for it doesn't exactly make it any clearer.
Based on the quick start guide I have also tried the following with no luck:
ClientAnchor anchor = chf.createClientAnchor();
Comment c = drawing.createCellComment(anchor);
c.setString(chf.createRichTextString(message));
A bit late, but this will probably work (it works for me, while the Apache POI example from the quick start also didn't work for me):
Erik Pragt
The following code works for me for Office 2007 (xlsx) format files. Figured this out from POI guide http://poi.apache.org/spreadsheet/quick-guide.html#CellComments and How to set comments for 3 cells using apache poi