Hyperlinks are not detected by Aspose.Cells

Hi, this is Nick from Kahua.com.
We are using Aspose.Cells 23.7. I also tried the latest version (Aspose.Cells 24.2) and it had the same problem.

I’ve create a speadsheet in Microsoft excel with two hyperlinks in A1 and A2 fields.

The A1 field has a hyperlink created using formula =HYPERLINK(“http://www.google.com”, “Load Google Page”)

While A2 field’s hyperlink was inserted using Insert->Link excel button.

When I load the excel file into the Aspose.Cells workbook and look at the Worksheet.Hyperlinks - the collection of Hyperlinks within the Worksheet is empty.
Am I doing smth wrong or why does Aspose.Cells not detect the hyperlinks when loading them from an excel spreadsheet?

How do I detect that the cell is a hyperlink?

Thanks

@npolyak,

I tested your scenario/case a bit and it works fine.

e.g.
Sample code:

//Create workbook
Workbook wb = new Workbook();

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Adding hyperlink using formula
string formula = "=HYPERLINK(\"http://www.google.com\", \"Load Google Page\")";
ws.Cells["A1"].Formula = formula;

//Adding hyperlink in normal way
int idx = ws.Hyperlinks.Add("A2", 1, 1, "https://www.aspose.com");
ws.Hyperlinks[idx].TextToDisplay = "Website";

int cnt = ws.Hyperlinks.Count;

Console.WriteLine(cnt);//1 - Ok - Since there is only 1 hyperlink added to the sheet. Please note, using "=HYPERLINK" is set as formula which would not be taken/added as/to Hyperlinks collection.

Could you please zip and attach your template Excel file containing those links, we will check it soon.

Actually I just got the license for the newest version and I agree - it works fine. Sorry for the trouble. It was probably something specific to the older version and perhaps also was one of the features that would not work without a license.

Only I am not sure how to close the ticket. Please, do it for me.

Thanks

@npolyak,

Good to know that you have sorted it out now. Please feel free to write us back if you have further queries or issue, we will be happy to assist you soon.

PS. I have closed the ticket now.