Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. The following code demonstrates what I mean.
//Create document and document builder.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
//Set default width of table cell
builder.CellFormat.Width = 50;
//Create first table with merged cells
builder.InsertCell();
builder.CellFormat.HorizontalMerge = CellMerge.First;
builder.InsertCell();
builder.CellFormat.HorizontalMerge = CellMerge.Previous;
builder.InsertCell();
builder.CellFormat.HorizontalMerge = CellMerge.None;
//End first row
builder.EndRow();
builder.InsertCell();
builder.InsertCell();
builder.InsertCell();
builder.EndRow();
builder.EndTable();
builder.Writeln();
//Build another table that will look as the previouse one
//But first row will contain only two cells
//First cell will look like merged but it is simply wide
builder.InsertCell();
builder.CellFormat.Width = 100;
builder.InsertCell();
builder.CellFormat.Width = 50;
//End first row
builder.EndRow();
builder.InsertCell();
builder.InsertCell();
builder.InsertCell();
builder.EndRow();
builder.EndTable();
//Save output document
doc.Save(@"Test070\out.doc");
If you open this document using DocumentExplorer you will see that the first row of the first table contains three cells but the first row of the second table contains only two cells. However, both tables look the same in MS Word.
Best regards.