Discussion:
HSSFComment autosize
Helfi
2011-10-11 13:10:54 UTC
Permalink
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.
Helfi
2011-10-13 13:24:59 UTC
Permalink
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.
Yegor Kozlov
2011-10-13 15:38:10 UTC
Permalink
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
Post by Helfi
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.
---------------------------------------------------------------------
Helfi
2011-10-20 14:18:32 UTC
Permalink
So the reason for this behaviour is the following property:

Loading Image...

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.
Helfi
2011-11-16 13:47:52 UTC
Permalink
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.
Helfi
2011-11-16 13:54:42 UTC
Permalink
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.

Loading...