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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Embedding Excel files into Word

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hello,

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?

Thanks,
Adam



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:
http://help.syncfusion.com/ug_83/Reporting/DocIO/ASP.NET/default.htm?turl=Documents%2Foleobject.htm

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

Regards
Rajendran




F96988_ebed1d8.zip

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
from:
doc.LastParagraph.AppendOleObject(@"..\..\Data\NorthwindTemplate.xls", pic, OleObjectType.Excel_97_2003_Worksheet);

to:

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

Thanks,
Adam




Sample_33cbaf90.zip

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

http://support.microsoft.com/kb/938757

Please let us know if you have any questions.

Regards,
Poornima


CONFIRMATION

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.

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

;