Hello All,

Can someone please help me with a method or tool that allows me to convert 
column width and row height settings into meaningful coordinate settings 
for the HSSFClientAnchor class so I may insert an image into my 
spreadsheet at full size?  The documentation doesn't specify the units of 
these coordinates, and they don't seem to correlate to pixels or any other 
units denoted in the documentation.

For example:

The constructor call is:
HSSFClientAnchor imageAnchor = new HSSFClientAnchor( topLeftX, topLeftY, 
bottomRightX, bottomRightY, startColumn, startRow, endColumn, endRow );

I have an image with width 308px and height 62px.

I would like to calculate the appropriate settings for bottomRightX, and 
bottomRight based in these pixel sizes (and the origin values in topLeftX 
and topLeftY).

After fiddling around with the values (and examining the errors thrown 
when I exceeded the cell boundaries), I came up with:
550, 0, 1023, 255

This seemed to be the closest I could get to the image size, but it still 
isn't full size.  This suggests that 62px translates roughly to 255 and 
308px translates to 473 (1023 - 550)?

I'm sure I've missed something fundamental.

Matt Robinson
---------------------------------------------------------------------------------------------------------------
Disclaimer:   
The information in this electronic mail message is confidential and may be 
legally privileged. 
It is intended solely for the addressee. Access to this Internet electronic 
mail message by anyone else is 
unauthorised. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken 
or omitted to be taken in reliance on it is prohibited and may be unlawful.  If 
you  have received this e-mail 
by mistake please call the sender immediately on 07 3853 5555 and erase the 
original message and any attachments.  
The Company accepts no responsibility for any effects this email message or 
attachments has on the recipient 
network or computer system.
---------------------------------------------------------------------------------------------------------------

Reply via email to