Hi,
In the attached screenshot, in the row index 1, columns indexes 1,2 are merged.
If wanted to read row index 1, column index 2 by using this row.getCells().get(2)
, I’m getting column index 3 data, because column index 1,2 are merged. How do I read the cell data according to their original column numbers.
@praveentermgrid In MS Word table there is no “column” concept, each row in the table is independent and can contain any number of cells. Please see our documentation for more information:
https://docs.aspose.com/words/java/working-with-columns-and-rows/#work-with-columns
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.
1 Like