Embed an Excel chart into PowerPoint

Hi,


I’m trying to determine if Slides would meet my requirements: I would like to import an Excel chart into a PowerPoint presentation using only Aspose Slides (without Cells).

With the trial version, I’ve managed to get part of the way by using “.Shapes.AddOleObjectFrame” and providing a workbook path, but I want a particular chart to be displayed no matter where the workbook was saved. Ideally, I want similar behaviour to when copying and pasting the chart.

I found a similar question on the forum but it was from 7 years ago so perhaps something has changed. Is this possible?

Thanks,

Prash

Hi Prash,

Thanks for inquiring Aspose.Slides.

I have observed your requirements and like to share that you can embed and also link MS Excel OLE Objects using Aspose.Slides for .NET. The ShapeCollection class exposes AddOleObjectFrame method for adding embedded and linked OLE Objects in presentation. You don’t require Aspose.Cells for this and can add or link OLE Object by visiting documentation link, Adding an OLE Object Frame to a Slide.

However, if you desire to set the MS Excel Chart as OLE Object Frame image, you need Aspose.Cells for this to get the chart image and set that as OLE Object Frame image to avoid default red, “EMBEDDED OLE OBJECT” image that is set by OLE Engine itself for OLE Object Frame in disabled form. Once you activate the OLE object by double clicking it in PowerPoint, the OLE Object Frame shall display the linked or embedded OLE data. This is neither an issue with Aspose.Slides nor an issue with PowerPoint.

Another solution to avoid default red, “EMBEDDED OLE OBJECT” image for added OLE Object Frame is to use any third party macros which could enable the OLE Object Frames in your presentation as soon as that is opened in PowerPoint. This way whenever the presentation will be loaded, all the OLE Object Frames will get enabled and will display the actual data view.

I hope the shared elaboration will be helpful.

Many Thanks,