Dear ivan,
Thanks for your inquiry. Sorry for the inconvenience caused by the deficient samples.
Sorry that at present our Spire.Doc doesn't support to split one cell to multi-cells. We have added the feature into our schedule.
We will inform you when the feature is supported.
Please try
- Code: Select all
ApplyHorizontalMerge(int rowIndex, int startCellIndex, int endCellIndex)
method and
- Code: Select all
ApplyVerticalMerge(int columnIndex, int startRowIndex, int endRowIndex)
method to merge multi-cells into one cell.
Share sample code and attached the result:
- Code: Select all
Document document = new Document();
Section section = document.AddSection();
Table table = section.AddTable(true);
table.ResetCells(5, 5);
table.ApplyHorizontalMerge(0, 0, 4);
table.ApplyHorizontalMerge(1, 2,4);
table.ApplyVerticalMerge(0, 2, 4);
document.SaveToFile("Sample.docx",FileFormat.Docx);
System.Diagnostics.Process.Start("Sample.docx");
Login to view the files attached to this post.