You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Benjamin May <Be...@t-online.de> on 2003/05/06 20:00:26 UTC

Optimal Width

Hello,

I'm a newbie concerning the POI-Api ! 
I found nothing to set the optimal width of a column in a sheet, but I think that this would be an important feature to implement in the API in the future. For example if you want to print a generated xls-File directly, you'll see only a part of the text in the cell. 

If there is a possibility to set the optimal width please tell me !

Thank you very much !



Re: Optimal Width

Posted by "Andrew C. Oliver" <ac...@apache.org>.
Note that Nicola sent a link to a Batik XML file which gave metrics for
several common fonts.


 5/6/03 8:17 PM, "Glen Stampoultzis" <gs...@iinet.net.au> wrote:

> At 04:00 AM 7/05/2003, you wrote:
>> Hello,
>> 
>> I'm a newbie concerning the POI-Api !
>> I found nothing to set the optimal width of a column in a sheet, but I
>> think that this would be an important feature to implement in the API in
>> the future. For example if you want to print a generated xls-File
>> directly, you'll see only a part of the text in the cell.
>> 
>> If there is a possibility to set the optimal width please tell me !
>> 
>> Thank you very much !
> 
> This is obviously an important feature as a number of people have asked for
> it.  The issue is that we would need the font metrics for the particular
> fonts being used in the workbook.  Given POI commonly runs on unix (and
> other OS's) these metrics aren't readily available.  A potential solution
> is to gather them and store them in some sort of resource file.  This is
> completely feasible but as yet no one has gotten around to implementing
> it.  As Andy would say... "it's a contribution opportunity". :-)
> 
> Regards,
> 
> 
> Glen Stampoultzis
> gstamp@iinet.net.au
> http://members.iinet.net.au/~gstamp/glen/
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?


Re: Optimal Width

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
At 04:00 AM 7/05/2003, you wrote:
>Hello,
>
>I'm a newbie concerning the POI-Api !
>I found nothing to set the optimal width of a column in a sheet, but I 
>think that this would be an important feature to implement in the API in 
>the future. For example if you want to print a generated xls-File 
>directly, you'll see only a part of the text in the cell.
>
>If there is a possibility to set the optimal width please tell me !
>
>Thank you very much !

This is obviously an important feature as a number of people have asked for 
it.  The issue is that we would need the font metrics for the particular 
fonts being used in the workbook.  Given POI commonly runs on unix (and 
other OS's) these metrics aren't readily available.  A potential solution 
is to gather them and store them in some sort of resource file.  This is 
completely feasible but as yet no one has gotten around to implementing 
it.  As Andy would say... "it's a contribution opportunity". :-)

Regards,


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/