B4J Question How can I read a cell that contains Hypertext in Excel

Giacomo

Active Member
Licensed User
Longtime User
I have an excel sheet which contains some Hypertext links to display an image
is it possible, using Jpoi, to obtain the text of the link link?
I have attached an example of the Excell file
 

Attachments

  • Sample.zip
    6.9 KB · Views: 139

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Dim wp As PoiWorkbook
wp.InitializeExisting("C:\Users\H\Downloads\Sample.xlsx", "", "")
Dim sheet As PoiSheet = wp.GetSheet(0)
Dim row As PoiRow = sheet.GetRow(0)
Dim cell As PoiCell = row.GetCell(9)
Dim jcell As JavaObject = cell
Dim Hyperlink As JavaObject = jcell.RunMethod("getHyperlink", Null)
If Hyperlink.IsInitialized Then
    Log("Label: " & Hyperlink.RunMethod("getLabel", Null))
    Log("Address: " & Hyperlink.RunMethod("getAddress", Null))
End If
 
Upvote 0
Top