Aspose Words Table Cell getHorizontalMerge is always 0

Hi,
cell.getCellFormat().getHorizontalMerge() is always 0 even on horizontally merged cells.
I attach an example
AsposeWordExporterTest.zip (14.8 KB)
and my “output”:
Cell : [1 Horizontal Merge]a Horizontal Merge: 0 Vertical Merge: 0
Cell : [2 Vertical Merge]a Horizontal Merge: 0 Vertical Merge: 1
Cell : [3 Hotizontal And Vertical Merge]a Horizontal Merge: 0 Vertical Merge: 1
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : a Horizontal Merge: 0 Vertical Merge: 2
Cell : a Horizontal Merge: 0 Vertical Merge: 2
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : [4 Not Merged]a Horizontal Merge: 0 Vertical Merge: 0
Cell : a Horizontal Merge: 0 Vertical Merge: 2
Cell : a Horizontal Merge: 0 Vertical Merge: 2

For this Table:
image.png (6.0 KB)

Thanks,
Federico

@federico.mameli In MS Word each row in the table is independent and can contain any number of cells. Therefore, horizontal merged cells in MS Word tables can be simulated by simply wide cells. You can convert “simply wide” cells to horizontally merged cells using the Table.convertToHorizontallyMergedCells method.

Ok Thanks,
Federico

1 Like