Hi,
I have a piece of VBA code which I am trying to re-write in JAVA using Aspose cells. I have attached the code snippet for reference. The code is being used to insert hyperlinks in a worksheet based on certain conditions. In one of such conditions, I am required to add a sub-address field to a hyperlink. I could not find such a functionality in Aspose cells although there was some reference to it in the thread mentioned below,
Could you please look into it ?
Code snippet:
With worksheet.Hyperlinks If(Condition 1) If (Condition 2) Then .Add Anchor:=range, Address:="Some URL" Else .Add Anchor:=range, Address:="Some URL" ScreenTip:=Screen_tip End If ElseIf (Condition 3)Then If (Condition 4) Then .Add Anchor:=range, Address:="", SubAddress:=link_Location Else .Add Anchor:=range, Address:="", SubAddress:=link_Location, ScreenTip:=Screen_tip End If End If
The equivalent JAVA code I am looking for should look something like,
if(condition 1) if(condition 2) worksheet.getHyperlinks().add(startCell, totalRows, totalColumns, address) else worksheet.getHyperlinks().add(startCell, endCell, address, textToDisplay, screenTip) else if(condition 3) if(condition 4) worksheet.getHyperlinks().add(startCell, totalRows,totalColumns, "", subAddress) else worksheet.getHyperlinks().add(startCell, endCell, "", subAddress, screenTip)