poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stackhouse <billsd...@verizon.net>
Subject HSSFSheet.setAutoSize
Date Mon, 08 Mar 2010 20:24:23 GMT
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.


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

View raw message