You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/03/25 17:09:17 UTC

DO NOT REPLY [Bug 48989] New: If we have a comment but the row is not created we will not be able to get it.

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

           Summary: If we have a comment but the row is not created we
                    will not be able to get it.
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: yury.gribkov@gmail.com


Regarding HSSFComment.getCellComment() we must have the row created; I bet it
is unnecessary.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 48989] If we have a comment but the row is not created we will not be able to get it.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48989

Evgeniy Berlog <su...@gmail.com> changed:

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

--- Comment #1 from Evgeniy Berlog <su...@gmail.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 48989] If we have a comment but the row is not created we will not be able to get it.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48989

Yury Gribkov <yu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yury.gribkov@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org