Hi AtliDev,
Regarding problem in merging cells:
When merging two table cells using the given code snippet (t.applyhorizentalMerge(1,2,1)) it throws exception. Because the given start index of cell is greater than end index which is not valid behavior, thus it throws exception.
Regarding merge last two table cells:
To meet your requirement, we suggest to merge 2nd and 3rd cell of 2nd table row using the below code snippet.
t.ApplyHorizontalMerge(1,1,2) |
As per Microsoft Word behavior while merging the table cells, it is behavior to maintain contents of both start and end cells in the merged cell. When merging cells using DocIO, it removes the contents of other cells and preserves only the start cell contents. We have validated this and confirmed it as a defect and logged a defect report. The fix for this will be included in our upcoming 2019 Volume 1 SP1 release. Which will be made available by the end of April 2019 tentatively.
Once this bug gets fixed, contents will be preserved properly like Microsoft Word behavior (contents of two cells in merged cell).
Regards,
Abirami