https://issues.apache.org/bugzilla/show_bug.cgi?id=48989

Evgeniy Berlog <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Evgeniy Berlog <[email protected]> ---
Hi, You can get cell comments using such chunk of code:

            HSSFWorkbook wb = new HSSFWorkbook();
            HSSFSheet sheet = wb.createSheet();
            Drawing drawing = sheet.createDrawingPatriarch();

            HSSFClientAnchor clientAnchor = new HSSFClientAnchor(0, 0, 0, 0,
(short) 0, 0, (short)3, 3);
            Comment comment = drawing.createCellComment(clientAnchor);
            RichTextString str = new HSSFRichTextString("Hello, World!");
            comment.setString(str);
            comment.setRow(3);
            comment.setColumn(4);

            FileOutputStream out = new FileOutputStream("workbook.xls");
            wb.write(out);
            out.close();

            wb = new HSSFWorkbook(new FileInputStream("workbook.xls"));
            sheet = wb.getSheetAt(0);

            comment = sheet.getCellComment(3, 4);
            System.out.println(comment.getString().getString());

Regards, Evgeniy

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to