You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by shankarrao <sh...@gmail.com> on 2011/01/13 11:48:15 UTC

Re: How to set the cell shrink to fit?

Even i am looking for how to use setShrinkTo() method in POI. Could someone
please help me in this regard?

-Shankar
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-set-the-cell-shrink-to-fit-tp3304220p3339573.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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


Re: How to set the cell shrink to fit?

Posted by shankarrao <sh...@gmail.com>.
Great! Thanks for your response Mark. I will try to use this method and let
you know if i have any issues.

-Shankar
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-set-the-cell-shrink-to-fit-tp3304220p3340854.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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


Re: How to set the cell shrink to fit?

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
Er, forgive me if I am being a bot thick but have you looked at the
autoSizeColumn(int) method yet? I guess most people use it to ensure the
colunms are large enough but I would imagine that it can adjust the size
both ways, up and down.

Yours

Mark B

PS The method is defined on the Sheet interface and should be accessible for
both HSSFSheet and XSSFSheet instances.
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-set-the-cell-shrink-to-fit-tp3304220p3339748.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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


Re: How to set the cell shrink to fit?

Posted by Tony Qu <to...@gmail.com>.
Hi,

I'm the developer of NPOI (.Net version of POI). NPOI has already
implemented this feature.  I suggest you take a look at npoi latest code
which is located at npoi.codeplex.com.

Please take a detailed look at the following class:
NPOI.HSSF.Record.ExtendedFormatRecord
NPOI.HSSF.UserModel.HSSFCellStyle

Hope this information is helpful for you.

Tony
2011/1/13 shankarrao <sh...@gmail.com>

>
> Even i am looking for how to use setShrinkTo() method in POI. Could someone
> please help me in this regard?
>
> -Shankar
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/How-to-set-the-cell-shrink-to-fit-tp3304220p3339573.html
>  Sent from the POI - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>