We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Embedding Excel files into Word

Thread ID:





96988 Oct 19,2010 07:27 AM UTC Oct 29,2010 11:46 AM UTC ASP.NET Web Forms (Classic) 3
Tags: DocIO
Administrator [Syncfusion]
Asked On October 19, 2010 07:27 AM UTC


I use XLSIO to generate Excel files and I need to put them as embedded OLE object (OleLinkType.Embed) to Word document.
Is this possible to do that by DOCIO? If yes how to do it?

In samples I've found coping oleobject (PDF) already embedded in one Word to another Word. It is possible to replace content of copied oleObject with Excel and change a caption?


Rajendran [Syncfusion]
Replied On October 21, 2010 11:38 AM UTC

Hi Adam,

Thank you for using Syncfusion products.

We have prepared a sample based on your requirement to embed Excel files into the word document. Please do find the sample from the attachment.

Regarding Caption:
Currently DocIO does not have the support for caption.

For further reference please refer our online documentaion from below link:

Please try this and let us know if you have any other questions.



Administrator [Syncfusion]
Replied On October 22, 2010 09:50 AM UTC

What I need is embedded link to object. In word document there should be icon (link to embedded file to Word doc), when user click on it, separate window (Excel, Acrobat Reader) should be displayed.

I've achieved this by changing 121 line of attached sample
doc.LastParagraph.AppendOleObject(@"..\..\Data\NorthwindTemplate.xls", pic, OleObjectType.Excel_97_2003_Worksheet);


doc.LastParagraph.AppendOleObject(@"..\..\Data\NorthwindTemplate.xls", pic, OleObjectType.Package);

Everything is fine. In generated Word document I can see an icon with embedded object(XLS file) but then I click on it and close opened (Excel) window, icon disappears from Word document. What's more if you save the opened word document (Save as .. option) and open it you cannot open embedded document again. I use Office 2003 SP3.

Please have a look attached sample.doc



Poornima R [Syncfusion]
Replied On October 29, 2010 11:46 AM UTC

Hi Adam,

Thank you for your interest in Syncfusion Products.

Regarding the issue "I click on it and close opened (Excel) window, icon disappears from Word document", this issue has been already fixed in our latest trunk. Could you please report this issue through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Regading the issue "if you save the opened word document (Save as .. option) and open it you cannot open embedded document again", When you open a document that contains an embedded OLE object in Microsoft Office Word 2003 or in an earlier version of Microsoft Word, the OLE object is permanently changed to an image that cannot be edited. Could you please refer the below link for more details


Please let us know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon