Hi,

You should turn on word wrapping.
Create a cell style with setWrapText(true) and assign it to the cell.

Yegor

AB> Hi all,

 

AB> Actually, I intend to make the height to fit the value of the cell.

 

AB> With best regards,

AB> Anjishnu.

 

AB> -----Original Message-----
AB> From: Anjishnu Bandyopadhyay [mailto:[EMAIL PROTECTED] 
AB> Sent: Wednesday, April 04, 2007 11:29 AM
AB> To: poi-user@jakarta.apache.org
AB> Subject: Auto fit of cell values in MS Excel

 

 

AB> Hi all,

 

 

 

AB> I am generating an MS Excel sheet through POI.

 

AB> For a column in the sheet, I am specifying a width by using the method

AB> "setColumnWidth()". Now, if the content of the cell is more, then,

AB> portions of the value in the cell are hidden. Is it possible to break

AB> the contents to the next line programmatically (the same effect that can

AB> be achieved by pressing "Alt+Enter")?

 

 

 

AB> Thanks for your time.

 

 

 

AB> With best regards,

 

AB> Anjishnu.

 

 

 

 

 

AB> **************** CAUTION - Disclaimer *****************

AB> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
AB> solely for the use of the addressee(s). If you are not the intended
AB> recipient, please notify the sender by e-mail and delete the original
AB> message. Further, you are not to copy, disclose, or distribute this
AB> e-mail or its contents to any other person and any such actions are
AB> unlawful. This e-mail may contain viruses. Infosys has taken every
AB> reasonable precaution to minimize this risk, but is not liable for any
AB> damage you may sustain as a result of any virus in this e-mail. You
AB> should carry out your own virus checks before opening the e-mail or
AB> attachment. Infosys reserves the right to monitor and review the content
AB> of all messages sent to or from this e-mail address. Messages sent to or
AB> from this e-mail address may be stored on the Infosys e-mail system.

AB> ***INFOSYS******** End of Disclaimer ********INFOSYS***


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to