Request to Add to "getHyperlinks" Option for Retrieving Links from Shapes in Aspose.Cells

Hello Aspose.Cells community,

I hope you’re all doing well. I have been using Aspose.Cells for my document manipulation needs, and I’m extremely satisfied with its capabilities. However, I’ve encountered a specific requirement in my project that I believe would greatly enhance the functionality of Aspose.Cells.

Currently, Aspose.Cells provides the “getHyperlinks” option to retrieve links (as HyperlinkCollection) from the worksheet. However, I also need to extract hyperlinks from shapes within the worksheet in my use case. This feature would be extremely valuable in scenarios where hyperlinks are associated with shapes, such as buttons, icons, or other graphical elements.

I would like to request that the Aspose.Cells development team consider adding an enhancement to the library that allows users to retrieve hyperlinks associated with shapes in addition to those in the worksheet. This would provide more comprehensive support for hyperlink handling within Excel documents.
i would like to avoid the workaround and go over all the shapes in each sheet and check if in the shape contains a hyperlink
I appreciate your attention to this request and look forward to any guidance or updates on this matter.

Thank you for your assistance.

Best regards,
Pavel

@paveln1234,

Please note, a worksheet can contain multiple hyperlinks, so we provide Worksheet.getHyperlinks() method for the task which returns hyperlinks collection (as HyperlinkCollection). But, since a shape can contain only one hyperlink, so we cannot add Shape.getHyperlinks() method for it.

You may easily extract hyperlinks from shapes by using the following sample code:
e.g.
Sample code:

Workbook wb = new Workbook("testshapeHyperlinks.xlsx");
Worksheet worksheet = wb.getWorksheets().get(1);
int cnt = worksheet.getShapes().getCount();
for(int i=0; i < cnt; i++)
{
     com.aspose.cells.Shape sh = worksheet.getShapes().get(i);
     System.out.println("Shape Name: " + sh.getName());
     System.out.println(sh.getHyperlink().getAddress());
}

Hope, this helps a bit.

thank you for your response

@paveln1234,

You are welcome.