POI do not copy style automatically. You also need to copy row by row, and
cell by cell. It is detailed in POI examples documentation.
You need to do programatically. The following snippet is in the sample
code I had shared.
if (newCellStyle != null && oldCell != null){
newCellStyle.cloneStyleFrom(oldCell.getCellStyle());
worksheet.autoSizeColumn(i);
}
--
Naga
(Srinivasa N Kadiyala)
+1 617 678 9164
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If you
are not the intended recipient, you should delete this message and any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, by you is strictly prohibited.
v.E.1
-----Original Message-----
From: sunny8875 <[email protected]>
Reply-To: POI Users List <[email protected]>
Date: Friday, July 11, 2014 at 7:27 AM
To: "[email protected]" <[email protected]>
Subject: Re: XSSF data hidden in cell/column when cells merged
>Hi Srinivasa,
>
>Thank you very much for you reply. Sorry I didn't get what you mean.
>
>What I am trying to do is programatically create a new excel document, And
>when I merge two cells the height is automatically fit so that the
>complete
>text isn't visible but where as I need the complete text to be displayed
>(Cell having the height so that complete text in the cell visible) even
>after merge. Please help me out here.
>
>Thanks,
>Srikanth
>
>
>
>--
>View this message in context:
>http://apache-poi.1045710.n5.nabble.com/RE-XSSF-data-hidden-in-cell-column
>-when-cells-merged-tp5715961p5715963.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]
>