Free Support Forum - aspose.com

Problem with Link Sources in XLSB document


#1

Hi Aspose team,

in attached project you will see that Link Sources reported are all relative links but when I open Excel files they are absolute with full path. Same in formulas.

Where this absolute part is coming from?

My scenario is that we are moving documents from one location to the other I have to make update of Link Sources. Now problem is that if I replace that what Aspose.Cells is telling me that we have old https://… is still staying in documents so we cannot make proper replacement. On the other side, as with Aspose.Cells I cannot find place (maybe you can help here) where https:///… is coming from I am not sure how to update that part of the links.

Also as a part of project you can find Word document with screenshots.

Thanks for help,
Oliver

XLSB.LinkSources.zip (723.6 KB)


#2

@dr_oli,

Thanks for the template file, screenshots and sample project with details.

I have evaluated your sample project with template file a bit.
I guess this is the behavior of different MS Excel versions. For example, if you could open your template file “book1.xlsb” into MS Excel 2007, you will see all paths to link sources are relevant links. But when you open it into MS Excel 2013, you can see that link sources and formulas are with https://drintra

I did check its source XML files, e.g in the sub-folder, “\xl\externalLinks_rels” and found what Aspose.Cells reads against the lines of code are ok as it does get the external sources from that location
e.g
Sample code:

..........
    Console.WriteLine(workbook.Worksheets.ExternalLinks[i].DataSource);
    Console.WriteLine(workbook.Worksheets.ExternalLinks[i].OriginalDataSource);

Aspose.Cells does read the data from external links directly from its source XMLs of the workbook. I am not sure if there is any issue with Aspose.Cells APIs. But if you still feel there is some bug or other limitation with Aspose.Cells, kindly let us know with details and samples, we will check and may log appropriate ticket for investigation.