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.
Unfortunately, activation email could not send to your email. Please try again.

Inserting excel file to word document as a OLE object using docio

Thread ID:

Created:

Updated:

Platform:

Replies:

79340 Feb 2,2009 10:54 PM Feb 10,2009 11:56 PM Windows Forms 5
loading
Tags: DocIO
Administrator [Syncfusion]
Asked On February 2, 2009 10:54 PM

Hi,

I would like to read chart objects from a excel file then insert them into a Word document using DocIO & XlsIO. How can I do that?

Thanks,
Winter


Bhuvaneswari P [Syncfusion]
Replied On February 4, 2009 07:38 AM

Hi Winter,

Thank you for your interest in Syncfusion products.

Currently we don't have any option to extract and insert the chart from the Excel to word document. However, we can work around this by converting the Excel chart to Essential chart by using Essential XlsIO and Essential Chart control by manually. Now convert the chart to image from the Essential chart and insert this image into the word document.
Please let me know if you have any other questions.

Best Regards,
Bhuvana



Bhuvaneswari P [Syncfusion]
Replied On February 4, 2009 08:13 AM

Hi Winter,

Please find the below KB article for Excel chart to Essential Chart conversion:
http://www.syncfusion.com/support/kb/xlsio/Default.aspx?ToDo=view&questId=122

Please refer the below code snippet to convert Chart to image:
this.chartControl1.SaveImage("c:\\chart.png");

// To insert the image into the word document:

//Create a new document
WordDocument document = new WordDocument();
//Adding a new section to the document.
IWSection section = document.AddSection();
//Adding a paragraph to the section
IWParagraph paragraph = section.AddParagraph();
//Inserting image
paragraph.AppendPicture( Image.FromFile ( "c:\\chart.png") );
document.Save("sample.doc");


Please let me know if this helps you.

Best Regards,
Bhuvana


Administrator [Syncfusion]
Replied On February 9, 2009 09:53 AM

HiBhuvana,

Thanks you very much for your reply.But I still have two questions:

1. I don't want to use a Chart control, so how can I generate a chart without using Chart control? This is something like in-memory generating.

2. How can I insert an Excel file in to a Word document as an OLE object? Supposing that I have an existing Exel file.

Best regards,
Winter




Bhuvaneswari P [Syncfusion]
Replied On February 10, 2009 02:09 AM

Hi Winter,

1. How can I generate a chart without using Chart control?

Currently it is not possible to generate a chart image without using the Chart control. Sorry for the inconvenience.

2. How can I insert an Excel file in to a Word document as an OLE object?

Currently we do not provide support for this feature. This has been confirmed as a Feature Request. We will implement this feature in our forthcoming new version releases or service pack releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity.
We will get back to you once the feature is implemented.

Currently we can get OLE object from existing document and insert into other document by using Essential DocIO. Please refers to the below online documentation link:

http://help.syncfusion.com/ug_71/docio/OLEObject.html

Please let me know if you have any o other questions.

Best Regards,
Bhuvana



Administrator [Syncfusion]
Replied On February 10, 2009 11:56 PM

Hi Bhuvana,

Thanks you for the update.

Best regards,
Winter


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.

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.

;