New API to detect type of Hyperlink in Excell sheet

Please share new Aspose version to test following feature:

CELLSNET-46822 – Detecting difference between internal and external hyperlinks

@23W,

Please try our latest version/fix: Aspose.Cells for .NET v19.7.1 (attached)

Your issue should be fixed in it. Please try Hyperlink.LinkType attribute.

Let us know your feedback.
Aspose.Cells19.7.1 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.7.1 For .Net4.0.Zip (4.9 MB)

Looks like there is bug in code.
Source file:
LinkTypes.zip (36.4 KB)
Cell B2 has External link, but your code returns Internal type for it.
b1.png (9.2 KB)

After testing I see that all links refer to file\folder path (B2, B3, B4) are detected incorrectly: they are Internal but should be Extrenal.
Cell referenced links (B5 and B6) are detected correctly.
Web related links (with https and mailto schemes) (B7 and B8) are also detected correctly as External links.

If you made it specially (detecting File Path related links as Internal), I think Internal should be renamed to PathReference. But I think it’s bug.

@23W,

Thanks for the template file and screenshot.

I have evaluated your issue using your template file. We think those links (B2, B3 and B4) should be specified as internal links which refer to local file(s)/paths, etc. How do you suggest or think these links are external links?

My idea was to support link types in terms of Excel, which branch them on internal (internal to workbook document, i.e. target is placed inside it), external (target is external document, e.g.: file, folder, web resource, email and so on) and cell references (it’s also named range reference).
I haven’t suggested to divide external link by placements of external target.
But now, I think that your idea is better and more useful. Detecting type of links by target placement is more convenient solution. I can’t insist on it but if you decided to implement this way, types of links should be:

  • FilePath: local and full paths to files\folders, URL with file:// scheme, UNC paths,
  • Web or External: URL with http://, https://, ftp:// schemes,
  • Email: URL with mailto: scheme,
  • CellReference: reference to cell\named range.

@23W,

We will evaluate your suggestion and check the feasibility if it can be incorporated this way. Otherwise, we will remain stuck to our existing (basic) implementation of hyperlinks types and won’t update the API anymore.

Thank you, it makes a reason.

@23W,
Could you please share an example file with your mentioned internal link.

Hi,
Sorry for late answer (just have found your question in mail).
Looks like you are right and it’s not possible to create hyperlink object tied with internal relationship record (from sheet relationships part \xl\worksheets_rels\sheet1.xml.rels).
As I see range\cell\shape hyperlink can refer to relationship with TargetMode=“External” only.

@23W,

Good to know that you understand it now. Feel free to contact us any time if you have further comments or question, we will be happy to assist you soon.