This project has moved. For the latest updates, please go here.

Problem with MergeCell method - merge cells in rows

Feb 17, 2012 at 10:00 AM

HI

I have a problem with  MergeCell method.

I want to merge cells in rows, but

MergeCell merge cells in columns table2.Rows[x].MergeCells(6, 9);

but I want to merge cells in rows.

table2.Rows.MergeCells(6, 9) - not found method

Please help

Thanks

Mar 5, 2012 at 4:29 PM
Edited Mar 5, 2012 at 4:30 PM

Hi,

I try to use DocX and to merge too. I find your subject but I think you haven't a problem

The syntax "table2.Rows.MergeCells(6, 9)" is wrong, table2.Rows is a collection of Rows.

If you want to merge all cells (6,9) of the table, try this:

foreach (Row _row in table2.Rows)
{
   _row.MergeCells(6,9);
}