Hi Vern
Thanks for your reply .. i have try to look for some example but i found
only java example and i'm not expert in java .. i tryed to understand this
java example and how to convert in RPGLE but i don't understand to menage
"factory" object
This is the link that i have found
https://stackoverflow.com/questions/7153254/how-to-add-cell-comments-to-exce
l-sheet-using-poi
public void addComment(Workbook workbook, Sheet sheet, int rowIdx, int
colIdx, String author, String commentText) {
CreationHelper factory = workbook.getCreationHelper();
//get an existing cell or create it otherwise:
Cell cell = getOrCreateCell(sheet, rowIdx, colIdx);
ClientAnchor anchor = factory.createClientAnchor();
//i found it useful to show the comment box at the bottom right
corner
anchor.setCol1(cell.getColumnIndex() + 1); //the box of the comment
starts at this given column...
anchor.setCol2(cell.getColumnIndex() + 3); //...and ends at that
given column
anchor.setRow1(rowIdx + 1); //one row below the cell...
anchor.setRow2(rowIdx + 5); //...and 4 rows high
Drawing drawing = sheet.createDrawingPatriarch();
Comment comment = drawing.createCellComment(anchor);
//set the comment text and author
comment.setString(factory.createRichTextString(commentText));
comment.setAuthor(author);
cell.setCellComment(comment);
}
Can some help me ?
Thanks in advance
As an Amazon Associate we earn from qualifying purchases.