You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Bill Stackhouse <bi...@verizon.net> on 2010/03/08 21:24:23 UTC

HSSFSheet.setAutoSize

After setting all text cells in a column with mostly long upper case 
strings, calling setAutoSize usually sets it to a width that is too narrow.

It appears that HSSFSheet.setAutoSize uses '0' as the default character 
width. The Verdana Plain 10 font on the Macintosh has a width of 6. 'W' 
and 'm' both are 10 and '%' is the widest at 11.

Shouldn't this be changed from '0' to '%' or loop through the 
FontMetrics of the font to find the widest character?

BTW I do see it setting the width more correctly using Helvetica Plan 
10, but not with Arial Plain 10 which is the default font.

Thanks
Bill

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