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. Image for the cookie policy date

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

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


5 Replies

BP Bhuvaneswari P Syncfusion Team February 4, 2009 12:38 PM UTC

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




BP Bhuvaneswari P Syncfusion Team February 4, 2009 01:13 PM UTC

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



AD Administrator Syncfusion Team February 9, 2009 02:53 PM UTC

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





BP Bhuvaneswari P Syncfusion Team February 10, 2009 07:09 AM UTC

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




AD Administrator Syncfusion Team February 11, 2009 04:56 AM UTC

Hi Bhuvana,

Thanks you for the update.

Best regards,
Winter


Loader.
Live Chat Icon For mobile
Up arrow icon