You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by davisoski <da...@gmail.com> on 2012/05/21 16:52:50 UTC

Merging cells

Hi.

I'm trying to create a structure in excel using *addMergedRegion*.

Let's say I have a header  like this

           Option 1                         Option 2                TOTAL
Option1.1    Option1.2      Option2.1     Option2.2

In excel it would be like this:
Option 1, A1-B1  (merged cells)
Option 2, C1-D1  (merged cells)
TOTAL, E1-E2  (merged cells)

Option1.1 (A2)
Option1.2 (B2)
Option2.1 (C2)
Option2.2 (D2)

SO, in a first step I need to create this, using code, but in a second step
I would like to read this structure from xml file in interative way to
create this structure or other (this part is done yet, but I can't be able
to create the excel file iterative).

Any idea, or at least the code for addMergedRegion to create the excel?????

Thanks


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Merging cells

Posted by davisoski <da...@gmail.com>.
kein probleme.

thanks for insterest




--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822p5709829.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Merging cells

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
OK, sorry, you will need to wait for someone far more experienced than I to
answer I am afraid.

Yours

Mark B

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822p5709828.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Merging cells

Posted by davisoski <da...@gmail.com>.
Hi,

Thanks for answer.

Of course I looked the guide, indeed I have routines using POI. Take a look
at this thread, maybe it explain what I'm trying to do. Is an old problem I
have.

http://apache-poi.1045710.n5.nabble.com/convert-html-to-excel-using-hssf-poi-td2309659.html

thanks



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822p5709827.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Merging cells

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
Have you taken a look at the Quick Guide yet?
http://poi.apache.org/spreadsheet/quick-guide.html#MergedCells

In addition, there is a utility or support class that can help you to
convert between Excels cell notation and POIs. Take a look at the
CellReference class -
http://poi.apache.org/apidocs/org/apache/poi/ss/util/CellReference.html

Any problems, just post to the list again.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822p5709823.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Merging cells

Posted by davisoski <da...@gmail.com>.
Here is an example of the header I want to create in excel.


http://www.primefaces.org/showcase/ui/datatableGrouping.jsf

I have the structure of the grouping header in a xml file.

thanks



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Merging-cells-tp5709822p5709832.html
Sent from the POI - User mailing list archive at Nabble.com.

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