poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Wilkins <t...@mediatel.co.uk>
Subject Re: merged cells
Date Mon, 08 Mar 2004 11:03:59 GMT
Unfortunetly a cell style does not include details on if a cell is part 
of a merge region or not, in fact each cell that is part of a merge 
region can have its own HSSFCellStyle.

I myself need to copy and paste cells that are part of a merge so I've 
created my own custom cell style class that records the dimensions of 
the merge and all the styles of the cells in the merge. Then I created 
my own cell writer method that accepts the custom cell style class and 
writes X number of cells to the sheet and sets up a new merge region on 
the sheet for them.

Its a little bit of work but solves the problem.

Tim

Dmitry Beransky wrote:

> Hi,
>
> within excel, if I copy&paste the format of a merged cell, the 
> destination cell also becomes merged.  However, if I try do to the 
> same from POI (i'm using v2.5), the merged setting doesn't carry 
> over.  Here's what I'm currently doing:
>
> style = myOrignalCell.getCellStyle();
> destCell.setCellStyle(style);
>
> is there anything special I need to do for merged cells?
>
>
> Thanks
> Dmitry
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message