after updating from 15.3 to 18.1 (latest version allowed by license) there are some issues with tables.
I have attached a project which demonstrates the issue as well as 3 documents which are created with different versions. One with 15.3 where everything looks good, another one with 18.1, where the issue starts to appear and latest we can use, and 19.4, the latest available, which still has the issue.
Thanks for your help.
AsposeTableIssue.zip (33.8 KB)
We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-18437. You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
Thanks for your patience. It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-18437) as ‘Not a Bug’.
The width assigned to the header cell by your code is greater than the sum of widths of all cells in the second row. It works as designed. Your code sets cell widths in millimeters and fractions of millimeters. However, DOCX format stores cell widths in twips (twentieth of a point, 0.05pt.). It is not possible to save a cell width value like 7.2222222222222223 mm or 15mm in in DOCX. Aspose.Words document model rounds the values set to CellFormat.Width up to 1/20pt right on setting. So, the incorrect rounded value causes the issue.
We suggest you please use the attached modified code to get the desired output. We have also attached the output DOCX with this post for your kind reference.
Document and Code.zip (7.1 KB)
Thanks for your help and code reference, it helped me to solve my issue.