I followed Aspose's sample code to add chart to a slide by adding the OLE Object.
This actually added the OLE Excel Object. Is there a way just to add the Chart without the entire spreadsheet? How do I do it if I create chart dynamically with Aspose.Cells (without reading an Excel file from my harddrive)? Thanks.
My code is like this:
//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation();
Slide slide = pres.AddEmptySlide();
FileStream fstro = new FileStream("C:\\excel1.xls", FileMode.Open,FileAccess.Read);
byte[] b = new byte[fstro.Length];
fstro.Read(b, 0, (int)fstro.Length);
//Inserting the excel chart as new OleObjectFrame to a slide
OleObjectFrame oof = slide.Shapes.AddOleObjectFrame(0,0,pres.SlideSize.Width,
pres.SlideSize.Height,"Excel.Sheet.8", b);
pres.Write("C:\\modified.ppt");