We have an exception running the following code (Aspose v.188.8.131.52):
string genericTemplatePath = @"1.xlsm";
string externalLinkFilePath = @"2.xlsx";
Workbook mainWorkbook = AU.AsposeCellsHelper.Instance.Open(genericTemplatePath);
Workbook userWorkbook = AU.AsposeCellsHelper.Instance.Open(externalLinkFilePath);
//This gets rid of the exception but we should not remove all the names
var b1 = userWorkbook.HasExernalLinks();
//This does not helps. Furthemore, both b1 and b2 are True...
var b2 = userWorkbook.HasExernalLinks();
MemoryStream ms = new MemoryStream();
//This causes the "Object reference not set to an instance of an object." at Aspose.Cells.ExternalSheetCollection.FindSupbook(Int32 refIndex)...
The files being used are attached. Please see the comments in the code. 2.xlsx contains a number of external references (names). .RemoveExternalLinks() does not work in this case. Before and after .HasExternalLinks() method returns True. Anyway, I think there should be no exception in any cases.
Could you please look into it asap as we experience the issue in production.