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/

Reply via email to