Hi There,
I am evaluating presentation.core dll to embed the excel file into ppt slide as an icon. I am able to embed the file but when I click on the icon it's opening the data with in the PPT rather than opening in Excel. Can you please guide me through to embed as Icon ?
public static void AddExcelOLEObject(this ISlide sld, ExcelOptions options)
{
//Get the excel file as stream
FileStream excelStream = new FileStream(options.FilePath, FileMode.Open);
//MemoryStream imageStream = ExcelHelper.GetExcelBitMap(excelStream);
////Image to be displayed, This can be any image
FileStream imageStream = new FileStream(options.IconPath, FileMode.Open);
//Add an OLE object to the slide
IOleObject oleObject = sld.Shapes.AddOleObject(imageStream, "Excel.Sheet.12", excelStream);
//Set size and position of the OLE object
oleObject.Left = options.x;
oleObject.Top = options.y;
oleObject.Width = options.width;
oleObject.Height = options.height;
oleObject.SetHyperlink(oleObject.FileName);
}
Thanks,
Nagesh