Hi Mark,

since this was my issue a couple of weeks (or is it months?) ago, I
might get back on this.

Actually it is a bug in the way, the row and column is calculated,
leading to strange stretching of the image.

I corrected the bug in my code, recompiled it and now it works fine. I
sent an e-mail to the dev-list with the modifications I did. However, I
did not follow, if the changes found their way into the current beta
release.

Cheers,
Hannes

PS: I sent the e-mail with the bug correction on 12 Feb 2011 17:42 - I
can send it again, if required

PPS: So it is "months" after all ...


Am 15.04.2011 13:42, schrieb Mark Beardsley:
> Some time ago, another post exactly like this one surfaced and we found that
> the problem was with the anchor. It actually 'attaches' for want of a better
> word, the bottom left hand corner of the image to the top left hand corner
> of an adjacent cell. To explain this a little better, imagine that you
> inserted an image into cell A1, then the bottom left hand corner of that
> image would actually be 'attached' - again for waht of a better word - to
> the top left hand corner of cell B2. This allows Excel to stretch the image
> if the width of column A is increased or the heigth of row one is likewise
> increased. It also seemed to be the reason why the image did not move when
> the data was sorted - it was anchored to the top left hand corners of two
> cells and Excel did not know how to handle this problem. The solution seemed
> to be to change the way the images anchor was created so that you specified
> the width and height of the image using Excels co-ordinate system; and I
> cannot remember off hand exactly what these values were and so need to look
> up some old code. When I get the full information, I will post again later.
> 
> The test I conducted to get to this answer was simple. I used POI to insert
> images into cells just as you did and confirmed the 'sort proble'. Next, I
> simply used Excel to modify the sizes of the images so that they no longer
> overlapped the edges of the cell and found that the sort problem was
> resolved. It might be worthwhile repeating this test yourself just to make
> sure my recollection is correct.

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

Reply via email to