We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SourceFullName is missing when checking inserted chart (not recognized as OLE)

Hi Aspose team,

I am trying to read SourceFullName of Excel chart inserted into Word document. It should be OLEObject but chart is reported as a Chart.

When I go to XML structure (ppt\charts\_rels) I can find for each inserted chart something like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

When I read document with very simple code like:

public void ReadOLE()
{
OleObjectFrame ole;
AutoShape auto;
Chart chart;
Console.WriteLine("1 (PPTX)." + DateTime.Now.ToString());
Aspose.Slides.Presentation pres = new Aspose.Slides.Presentation("1.pptx");
Console.WriteLine("2 (PPTX)." + DateTime.Now.ToString());
foreach (ISlide sld in pres.Slides)
{
foreach (Shape shape in sld.Shapes)
{
if (shape is OleObjectFrame )
{
ole = (OleObjectFrame) shape;
try
{
Console.WriteLine("3 (PPTX OleObjectFrame). SourceFullName: " + ole.LinkPathLong.ToString());
}
catch (Exception)
{

Console.WriteLine("3 (PPTX OleObjectFrame): NULL");
}

}
else
{
if (shape is Chart)
{
chart = (Chart) shape;
try
{
Console.WriteLine("4 (PPTX Chart). SourceFullName: " + chart.ToString());
}
catch (Exception)
{
Console.WriteLine("4 (PPTX Chart): NULL ");
}
}

}
}
}
Console.WriteLine("5 (PPTX)." + DateTime.Now.ToString());
}
I am not able to find where is stored data source of this chart thus I left in code only chart.ToString(). Is there any option to find data source as obviously it is stored in document XML structure?

Btw. why is this not recognized as a OLE object and why there is no reference to XML above where source is found?

Please find attached sample project and test document.

Hi Oliver,


Thank you for contacting support. In the first line of your post, you have narrated that you are retrieving an OLE Excel chart from the source Word document, but in the code you are loading a Powerpoint presentation. In the zip archive, there are too many code samples and Microsoft office files. Please narrow down the use case, share appropriate source code and input file. We’ll investigate and reply you appropriately. Your response is awaited.

Hi Imran,

I need to find access (get/set) of source file for inserted chart.
In attached Word document I marked with arrows what I cannot do.

If I go to 1.pptx file and check XML that was provided in initial post I can see that there is link from Word document and that this is probably OLEObject but Aspose cannot find it:

ole.LinkPathLong.ToString()

Does this make sense?
How can I access those references to external files?

Thanks

Hi Oliver,

I have observed the issue shared by you and have added an issue with ID SLIDESNET-38192 in our issue tracking system to further investigate and resolve the issue. By the way can you please share if you have added chart as Ole frame or as normal MSO chart. Also when I have extracted 1.pptx using WinRar, the charts xml has no information about linked data source as mentioned by you in your very first post. Can you please make sure, if you have shared right presentation file with us. I have attached the extracted charts xml for your reference as well.

Many Thanks,

Hi Mudassir,

thanks for picking-up.
As I got this document from customer I am not sure how his end-users entered those charts. Anyway, I'll ask.

If you go to folder ppt\charts\_rels in, for example, chart1.xml you will see:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Target is to be able to read and change (get/set) of this Target value from XML file.

Hi Oliver,

Thank you for sharing further information. I have added that in our issue tracking system for further investigation. Please also share the information regarding how the charts have been added as well with us once you get feedback from customer.

Many Thnaks,

Hi,

unfortunately my customer was not able to find what end-users did :(.
Based on provided file do you think that you might be able to figure how to close this topic?

Hi Oliver,


I like to share that at present we will try to resolve the issue based on shared information and if any further assistance will be needed, we will request you in this regard.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-38192) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.