We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel objects links lost after converting DOCX to HTML and back

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?

@ServerSide527,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-18158. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.