Broken table when saving as docx

Hello,

I’m creating a few complex tables which include colspans and rowspans. When I’m saving these documents as .doc file everything looks fine. When I open this .doc file and “Save As” as .docx then table is broken.
Is there a bug in Aspose or do I have to take care to something?

Best Regards
Ravi

Hi Ravi,
Thanks for your request. Could you please attach your documents here for testing? We will check the issue and provide you more information.
Best regards,

Hi,
Please findout the attachment. Please check third column on the second page.
Regards
Ravi

I’ve opened a thread yesterday where this problem is described for AW for Java. I think it’s the same problem here.

Hi Ravi,
Thank you for additional information. But as I can see, if open and save as DOCX your original in MS Word, the same problem occurs as if open save as DOCX the document produced by Aspose.Words. So I suppose there is something wrong with your original document.
It seems the problem is caused by FitText option. Most likely this option is handled differently in DOC and DOCX formats and that is why you see the difference. As a workaround, you can reset this option. For example, see the following code:

Document doc = new Document(@"Test001\Test+-+Report.doc");
// Reset FitText option in all cells.
NodeCollection cells = doc.GetChildNodes(NodeType.Cell, true);
foreach(Cell cell in cells)
{
    if (cell.CellFormat.FitText)
        cell.CellFormat.FitText = false;
}
// Save output.
doc.Save(@"Test001\out.doc");

Best regards,

Hi Jan,
Thanks for your request. But unfortunately, here is another problem than you reported in your thread.
Best regards,

Thanks,
I will try and let you know the result.
Regards
Ravi