You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Duncan Krebs <li...@krebsnet.com> on 2004/11/10 22:18:37 UTC

using poi to set a column width

Hi,
>From looking through the examples on the POI site I've figured out everything I need except for setting a column width in excel using HSSF, does anyone know how to do this? Thanks. - dkrebs

Re: using poi to set a column width

Posted by Duncan Krebs <li...@krebsnet.com>.
I have it working, thanks for the help! - dkrebs

----- Original Message ----- 
From: "Alex Karshakevich" <al...@thoughtspeed.biz>
To: "POI Users List" <po...@jakarta.apache.org>
Sent: Wednesday, November 10, 2004 3:27 PM
Subject: Re: using poi to set a column width


> You can do:
> ...
> HSSFSheet summarySheet = wb.createSheet();
> summarySheet.setColumnWidth(short column, short width);
> ...
>
> The units of width are pretty small, you can try 4000 for example.
>
> Alex.
>
>
> Duncan Krebs wrote:
>
> >Hi,
> >>From looking through the examples on the POI site I've figured out
everything I need except for setting a column width in excel using HSSF,
does anyone know how to do this? Thanks. - dkrebs
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: using poi to set a column width

Posted by Alex Karshakevich <al...@thoughtspeed.biz>.
You can do:
...
HSSFSheet summarySheet = wb.createSheet();
summarySheet.setColumnWidth(short column, short width);
...

The units of width are pretty small, you can try 4000 for example.

Alex.


Duncan Krebs wrote:

>Hi,
>>>From looking through the examples on the POI site I've figured out everything I need except for setting a column width in excel using HSSF, does anyone know how to do this? Thanks. - dkrebs
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org