Creating table with cell merge generates incorrect output using .NET

Hi all,
Hoping someone can help me.
I am using the latest Aspose.Words (20.3.0.0) in .Net, and I am reading in content dynamically to create and populate tables in a word document. It seems my tables come into word fine but when first opened they do not look right. Ill try to upload before and after photo(s). When I touch the far right border the table fixes itself. Obviously I want the tables to show correctly when the document is opened, not having to touch the right hand column.
Any ideas?
Thanks!

before.png (14.7 KB)
after.png (30.5 KB)

@assaohs

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

ok sorry, hope you can see what I mean by the attached. to fix the undesired table you can just drag the right column left or right… it fixes itself. perhaps this is more of a Word issue, but let me know if you know how to fix from Aspose side of things??
Thanks,
Alex.

aspose table issue.zip (136.0 KB)

@assaohs

You are using Aspose.Cells and Aspose.Words. We are unable to execute your code. It seems that this issue is related to table and cells width. Please make sure that you are setting table and cells width correctly.

If you still face problem, please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

Hi,
Thought I should post back and let you know I sorted it out.
I was setting the cellmerge horizontal and vertical depending on the direction, but not resetting the other (horizontal or vertical) to none. So now, whenever I change from horizontal to vertical merging of cells, if I set the opposite to none, it all works as expected!
Thanks,
Alex.

@assaohs

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.