Hi all,
I was using Aspose Cells 22.1 and everything was good and well until I upgraded to Aspose 23.12 (I have also tested with 24.3)
I have several samples where Aspose Cells fails to remove hyperlinks,
The error msg is Object reference not set to an instance of an object.
The Hyperlink object is not null, but yet, it outputs that error. This lead me to believe that Hyperlink’s parents object might have been disposed incorrectly.
var workbook = new Workbook(inputStream, opt);
foreach(var worksheet in workbook.Worksheets)
{
try
{
for(int i = worksheet.Hyperlinks.Count - 1; i >= 0; i--)
{
var currentHyperlink = worksheet.Hyperlinks[i];
currentHyperlink.Delete(); // error here
}
}
catch(Exception ex)
{
}
}
0d878d27c2f345de9f0644e2f9056757.zip (44.4 KB)