Hi team,
I am not able to embed excel file to Power point slide created with syncfusion. All I get is corrupted ppt with embedded excel not opening. I need to embed excel as OleDB object, not import data from excel. Below is the code used:
ISlide slide = pres.Slides.Add(SlideLayoutType.Blank);
FileStream excelStream = new FileStream(@"C:\Project\Reports\ExcelSample.xlsx", FileMode.Open);
FileStream imageStream = new FileStream(@"C:\Project\excel.png", FileMode.Open);
slide = pres.Slides[0];
Syncfusion.Presentation.IOleObject oleObject = slide.Shapes.AddOleObject(imageStream, "Excel", excelStream);
oleObject.Left = 10;
oleObject.Top = 10;
oleObject.Width = 40;
oleObject.Height = 30;
FileStream outputStream = new FileStream(@"C:\Project\Reports\OleObjectSample.pptx", FileMode.Create);
pres.Save(outputStream);
Kindly help