Thank you for your piece of code.
In fact, my client wants to access the charts' data and modify them. So, we do need the Excel OLE (since Aspose is not ready yet to implement the Insert Chart feature of Powerpoint 2007, which is too bad really...). What my client also would like, is for the charts to look as fine as they used to when the OLE Object front Image had been created by Aspose.Cells.
Therefore, my current solution is to run, once the Presentation Excel charts data have been manually modified (and thus the corresponding pictures badly recreated by MS) and the Ppt saved + exited), a home-made application which recreates the OLE front pictures of all charts with Aspose.Cells. This works fine, except that my client will have to do some "post-treatment" on its Presentations...
Any ideas perhaps on how this application could be automatically launched after a save+exit event ? Thanks !
Here is the VB.NET code :
Dim file = "myReport.ppt"
Dim Pres As New Presentation(file)
For Each Sld As Slide In Pres.Slides
For Each Shp As Aspose.Slides.Shape In Sld.Shapes
If Not TypeOf (Shp) Is Aspose.Slides.OleObjectFrame Then Continue For
Dim OLE = CType(Shp, Aspose.Slides.OleObjectFrame)
Dim ms As New MemoryStream()
ms.Write(OLE.ObjectData, 0, OLE.ObjectData.Length)
Dim Book As New Workbook
Dim Cht = Book.Worksheets("ChartSheet").Charts(0)
Dim o As New ImageOrPrintOptions()
o.ImageFormat = Imaging.ImageFormat.MemoryBmp
Dim img As Bitmap = Cht.ToImage(o)
Dim pic As New Aspose.Slides.Picture(Sld.Parent, img)
OLE.PictureId = Sld.Parent.Pictures.Add(pic)