You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Helfi <st...@t-online.de> on 2011/10/11 15:10:54 UTC

HSSFComment autosize

Hello,

I got a new "Problem" with Comments.
Iam creating Comments and also apply a Autofilter, if the user now selects a
autofilter and some rows are collapsed the comments arent displayed correct.

When I create the comments I set an Anchor:


Example:
row1   comment ok
row2
row3   comment ok
...

after Filter:
row1   comment not ok
row3   comment ok
...

because the row1 comment is strained over row 1 and row 2?

Is there a workaround to handle this?

In Excel I got a VB-Macro 

End Sub

after running this it works fine.
But this macro is not very performant and it took a while, also it isnt very
nice to for the user to run the macro first.

Now my Question is it possible to set this flag for a Comment?

I looked at the HSSFComment/Shape classes but I didnt really understand how
to access some Flags like this. Maybe you can help me or provide me with
further informations.

With the new xlsx format the problem doesnt occur.

Greetings Stefan


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4891743.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: HSSFComment autosize

Posted by Helfi <st...@t-online.de>.
forget it -.-

found it myself at the anchor

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4997775.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: HSSFComment autosize

Posted by Helfi <st...@t-online.de>.
Hi again,

I think i found the difference in the BiffDump:

http://apache-poi.1045710.n5.nabble.com/file/n4997750/compare.bmp 

On the right side is the basic Excelvalue and on the left side the value
like it is set from poi.

it is also already descriped in this discription:
http://poi.apache.org/apidocs/org/apache/poi/ddf/EscherClientAnchorRecord.html#setFlag%28short%29
http://poi.apache.org/apidocs/org/apache/poi/ddf/EscherClientAnchorRecord.html#setFlag%28short%29 

But how can i change this value for my created comments?


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4997750.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: HSSFComment autosize

Posted by Helfi <st...@t-online.de>.
So the reason for this behaviour is the following property:

http://apache-poi.1045710.n5.nabble.com/file/n4921594/shiftobj03-thumb.gif 

that option is selected when creating a comment with POI.

But it should be the third option -> dont move or size with cells

Iam still analyzing the Biff Output but still I dont catch it.

Maybe you got an idea where this option could be hide, thanks.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4921594.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: HSSFComment autosize

Posted by Yegor Kozlov <ye...@dinom.ru>.
Create two simple files in Excel: one without autofilter and the other
with a autofilter applied. Dump the BIFF data using
org.apache.poi.hssf.dev.BiffViewer and compare.

Once you've figured out what is different we can suggest you how to
set this property or fix the problem.

Regards,
Yegor

On Thu, Oct 13, 2011 at 5:24 PM, Helfi <st...@t-online.de> wrote:
> yegor or nick no idea? :/
>
> ;)
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4899206.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
>
>

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


Re: HSSFComment autosize

Posted by Helfi <st...@t-online.de>.
yegor or nick no idea? :/

;)

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFComment-autosize-tp4891743p4899206.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