Hello there.
Aspose words is used in a a very critical feature in my company’s application where we generate contracts in ms word.
I am having an issue in performing cell horizontal merge inside a table.
Following is the pseudo code :-
1.Load the document
2.Get the table.
3.Horizontal merge
cell.getCellFormat().setHorizontalMerge(CellMerge.FIRST);
nextCell.getCellFormat().setHorizontalMerge(CellMerge.PREVIOUS);
4. Vertical merge:-
cell.getCellFormat().setVerticalMerge(CellMerge.FIRST);
nextCell.getCellFormat().setVerticalMerge(CellMerge.PREVIOUS);
5. end
But, after performing the merge only the contents from the FIRST cell are preserved and the rest of them are lost.
So I added the following code after each merge.
origCell.appendChild(nextCell.getFirstParagraph());
Now the contents of all the cell were preserved in horizontal and vertical merge.
But the issue is:-
In HORIZONTAL MERGE the above mentioned code puts the contents of the cell BELOW the ORIGINAL CELL.
I want the contents of horizontally merged cell to have the same alignment(The value should be below the header field ) as before the merging but in one cell.
I am attaching the document for you guys.
This is a very critical issue for my company and I need to fix it ASAP.
Please help.
Thanks and Regards
Vishal
Hi Vishal,
Thanks Adam for for quick diagnosis and reply. I really appreciate it.
The workaround you suggested I could sell it to the management and it was easy to implement.
Cheers!
Vishal