Tahir, It's possible to do. Probably it will a a param telling the algorithm to preserve wide columns. I will look at it later.
Thanks for the idea. Yegor TA> Yegor, TA> Is it possible to somehow auto-size only those columns that are not wide TA> enough to display there content but leave those columns that are wider than TA> required? I mean that I don't want to shrink the columns that can show there TA> content even if they are wider than max width of content. TA> Wassalam, TA> 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/ TA> --------------------------------------------------------------------- TA> To unsubscribe, e-mail: [EMAIL PROTECTED] TA> Mailing List: http://jakarta.apache.org/site/mail2.html#poi TA> 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/