[Urgent] How to retrieve Microsoft Excel Chart Object from PowerPoint file

Hi,


I have developed an .net console application using Aspose.Slides API to retrieve any external links used in my PowerPoint file.

I can able to retrieve all the hyperlinks from the file. But If I use Microsoft Excel Chart, I am unable to retrieve the link.

I have attached the screenshot and the file for reference.

Kindly assist to solve the issue.

Regards,
David.

Hi David,

Thanks for inquiring Aspose.Slides.

I have observed your requirements and like to share that the linked excel file link is associated with Ole objects. I suggest you to please try using following sample code to extract Ole links.

public static void loadOleLinks()
{

String path = “C:\Aspose Data\”;
Presentation pres = new Presentation(path + “PPT1.pptx”);
ISlide slide = pres.Slides[0];
foreach (IShape shape in slide.Shapes)
{
if (shape is IOleObjectFrame)
{
IOleObjectFrame ole = (IOleObjectFrame)shape;

if (ole.IsObjectLink)
{
String oleLink = ole.LinkPathLong;
}

}
}
}


Many Thanks,

Hi Mudassir,


Thanks for the update.
I also need to replace the existing linked excel file link with new one.

Kindly assist to solve the query.

Regards,
David.

Hi David,


I have observed your comments. We will share feedback with you soon.

Best Regards,

Hi David,

I have observed your comments and like to share that ole.LinkPathLong property in above sample code is both readable and writeable. You can set the string path of new linked file for Ole using ole.LinkPathLong on your end. I hope this will be helpful.

Many Thanks,