You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Gunny <st...@tellnet.it> on 2013/01/30 16:07:14 UTC

Cell comments always visible

Hello guys,
a simple question about comment use in apache poi.
I'm trying to make all the comments pop-up always visible. The method
setVisible of HSSFComment is set to true, but when the excel document is
generated and opened (with Microsoft Excel 2007) all the comments are
hidden. Only with a mouse-over operation the comment opens and remain
visible.
Is there a simple way to solve this problem?



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Cell-comments-always-visible-tp5712022.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Cell comments always visible

Posted by Evgeniy Berlog <su...@gmail.com>.
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

On Wed, Jan 30, 2013 at 7:14 PM, Gunny <st...@tellnet.it> wrote:

>
> ClientAnchor anchor = factory.createClientAnchor();
> anchor.setCol1(dataCell.getColumnIndex());
> anchor.setCol2(dataCell.getColumnIndex() + 1);
> anchor.setRow1(dataRow.getRowNum());
> anchor.setRow2(dataRow.getRowNum() + 1);
> anchor.setDx1(100);
> anchor.setDy1(0);
> anchor.setDx2(100);
> anchor.setDy2(0);
> HSSFComment comment = patr.createCellComment(anchor);
> comment.setBackgroundImage(pictureIdx);
> comment.setVisible(true);
> comment.setRow(dataRow.getRowNum());
> comment.setColumn(dataCell.getColumnIndex());
>
>
> In this case I set a background image in the comments. Everything it's ok
> except the "always visible" function of the comments. When I open the
> generated xls the comments are hidden.
>
> This is the result
>
> <http://apache-poi.1045710.n5.nabble.com/file/n5712026/1.jpg>
>
> And this is what I need
>
> <http://apache-poi.1045710.n5.nabble.com/file/n5712026/2.jpg>
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/Cell-comments-always-visible-tp5712022p5712026.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: Cell comments always visible

Posted by Gunny <st...@tellnet.it>.
ClientAnchor anchor = factory.createClientAnchor();
anchor.setCol1(dataCell.getColumnIndex());
anchor.setCol2(dataCell.getColumnIndex() + 1);
anchor.setRow1(dataRow.getRowNum());
anchor.setRow2(dataRow.getRowNum() + 1);
anchor.setDx1(100);
anchor.setDy1(0);
anchor.setDx2(100);
anchor.setDy2(0);
HSSFComment comment = patr.createCellComment(anchor);
comment.setBackgroundImage(pictureIdx);
comment.setVisible(true);
comment.setRow(dataRow.getRowNum());
comment.setColumn(dataCell.getColumnIndex());


In this case I set a background image in the comments. Everything it's ok
except the "always visible" function of the comments. When I open the
generated xls the comments are hidden.

This is the result

<http://apache-poi.1045710.n5.nabble.com/file/n5712026/1.jpg> 

And this is what I need

<http://apache-poi.1045710.n5.nabble.com/file/n5712026/2.jpg> 



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Cell-comments-always-visible-tp5712022p5712026.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Cell comments always visible

Posted by Evgeniy Berlog <su...@gmail.com>.
Hello Gunny,

Can you please attach the code to this thread you used to generate document
with comments?

Regards, Evgeniy

On Wed, Jan 30, 2013 at 5:07 PM, Gunny <st...@tellnet.it> wrote:

> Hello guys,
> a simple question about comment use in apache poi.
> I'm trying to make all the comments pop-up always visible. The method
> setVisible of HSSFComment is set to true, but when the excel document is
> generated and opened (with Microsoft Excel 2007) all the comments are
> hidden. Only with a mouse-over operation the comment opens and remain
> visible.
> Is there a simple way to solve this problem?
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/Cell-comments-always-visible-tp5712022.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>