per my requirement it should
> accept float value as well, could you help me to resolve this?
>
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/Set-column-width-in-sensible-units-tp2304417p5720046.html
> Sent from the POI - User m
-column-width-in-sensible-units-tp2304417p5720046.html
Sent from the POI - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org
I missed the whole problem of setting the column width after data was
inserting in the cell. You are correct that there would have to be a formula
based on the font being used.
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Set-column-width-in-sensible-units
> Let me correct my math errors.
How embarrassing. Getting old.
>> Let's see.
>>
>> 1 point = 20 twips
>> 72 points = 1 inch
>>
>> Font metric for the "0" zero character is 556/1000 x 10 points = 5.56 pts
>> per character.
>>
>
> 5.56 x 20 = 112 twips per default character.
111.2 twips per
Let me correct my math errors.
> Let's see.
>
> 1 point = 20 twips
> 72 points = 1 inch
>
> Font metric for the "0" zero character is 556/1000 x 10 points = 5.56 pts per
> character.
>
5.56 x 20 = 112 twips per default character.
> 1 character = 256 width units
>
> How many twips per width
Hi,
> I feel like I have got to be missing something obvious - all I want to do is
> set column width in twips, same as you can do with the rows, rather than in
> whatever the heck 1/256th of a character width is. It turns out that
>
> public void setColumnWidth( HSSFSheet sheet, int colIdx, dou
else
return 450; // default to column size 1 if zero, one or
negative number
is passed.
}
Good Luck!
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Set-column-width-in-sensible-units-tp2304417p4257949.html
Sent from the POI - User mailing list archive at Nabb
I feel like I have got to be missing something obvious - all I want to do is
set column width in twips, same as you can do with the rows, rather than in
whatever the heck 1/256th of a character width is. It turns out that
public void setColumnWidth( HSSFSheet sheet, int colIdx, double widthInTwip