Yegor,

Thanks for implementing the much needed functionality. 

Is it possible to somehow auto-size only those columns that are not wide
enough to display there content but leave those columns that are wider than
required? I mean that I don't want to shrink the columns that can show there
content even if they are wider than max width of content.

Wassalam,

Tahir

> -----Original Message-----
> From: Yegor Kozlov [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 26, 2007 10:42 PM
> To: POI Users List
> Subject: HSSF Announcement: column autofit is implemented
> 
> Hi All
> 
> I'm pleased to announce that the "autofit column width" feature is
> implemented in HSSF. There were many requests to have it since the very
> beginning of POI and finally it is present.
> 
> The implementation is pure Java2D and the result is pretty close to
> what excel calculates.
> 
> Usage:
> To autofit a column just call HSSFSheet.autoSizeColumn(short column)
> as follows:
> 
>  HSSFSheet sheet;
>  ...
>  sheet.autoSizeColumn((short)0); //autofit the first column
> 
> 
> Important note: the fonts used in the xls being auto-fitted must be
> available. Otherwise Java will use default font and the result may be
> not correct.
> 
> Regards,
> Yegor Kozlov
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to