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

Free Support Forum - aspose.com

Can't find image path in XLS (but can find it in XLT

Similar to other issue posted (XLSB). See attached zip file.


For XLS the code below does not find the image path, for XLT it does. And the XLT file was created by opening the XLS file in Excel 2010, 32 bit, and saving it as XLT.

I want to be able to retrieve the image path in both files.

To reproduce:
Extract zip file to c:\temp or similar and call the function below with both XLS and XLT file.


public static void PrintImageLinks(string path)
{
AsposeLicenseManager.License(XlsFileHandler.License, stream => XlsFileHandler.License.SetLicense(stream));
var w = new Workbook(path);
var ws = w.Worksheets[0];
Console.WriteLine(@“Image Links for file " + path);
foreach (var picture in ws.Pictures)
{
if (!string.IsNullOrEmpty(picture.SourceFullName) && !picture.SourceFullName.Equals(@“NULL”))
{
Console.WriteLine(picture.SourceFullName);
}
}
foreach (Shape shape in ws.Shapes)
{
var o = shape as OleObject;
if (!string.IsNullOrEmpty(o?.ObjectSourceFullName))
{
Console.WriteLine(o.ObjectSourceFullName);
}
}
Console.WriteLine(@”-------------------------------");
Console.WriteLine();
}

Hi,


Thanks for using Aspose.Cells.

Please check the update relating to this issue in your other thread at the following post.