Hi,
With a Word document which has tables/charts linked to an Excel worksheet, when saving the document to HTML using Word ‘save as’, then open the html using Word, then use ‘save as’ to save it back to DOCX, the link still remains in the final DOCX file.
However, I found it was not the case in Aspose, where the link was lost during the conversion.
Code:
var doc = new Document(@".\test.docx");
var htmlSaveOption = new HtmlSaveOptions();
htmlSaveOption.AllowNegativeIndent = true;
doc.Save(@".\asposeout.htm", htmlSaveOption);
var htmlDoc = new Document(@".\asposeout.htm");
htmlDoc.Save(@".\asposeconvertedBack.docx");
I’ve attached my test files and a screenshot for your reference. The ‘test.docx’ file has a link to the ‘Book1.xlsx’ workbook attached, while ‘asposeConvertedBack.docx’ has lost the link information. The same issue doesn’t happen with ‘wordConvertedBack.docx’ where the intermediate HTML and final DOCX was created by MS Office ‘save as’ feature.
test files.zip (40.0 KB)
image.png (45.7 KB)
Could you help me check how to retain the link using Aspose?