I have not ried this but I do believe that it will work.

Add all of the data to your sheet with the exception of any that should not
affect the call to the HSSFSheet.autoSizeColumn() method. Call that method
then add the remaining data to the sheet. I believe that the data added
after the method call will not affect the automatic resizing of the columns
width.

It should be easy enough to check by creating cells in column one of rows
one, three and four and then calling the autoSizeColumn() method on column
one of the sheet. Next add data to the appropriate cell in row two and make
sure it is larger/longer than the data in the corresponding cell in rows
one, three and four. Save the workbook away and then open it up using Excel.

Yours

Mark B


deep4u wrote:
> 
> Hello, 
>         I am new to this. In my application i generate Excel Sheet using
> apache poi. Its working fine. but my requirement is i set the autosize to
> 1st coulmn in that no need of some cells. For this how can we
> implement,please share your ideas.
> 
> Regards,
> Deepu
> 

-- 
View this message in context: 
http://www.nabble.com/autosize-in-Excel-tp24604780p24620663.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to