Android Question Read formula text from Excel files on Android

b4auser1

Well-Known Member
Licensed User
Longtime User
I didn't find in The Excel library a method to read the text of formuala.
GetCellValue just returns value produced by the formula.
How to read the text of formula ?
 

b4auser1

Well-Known Member
Licensed User
Longtime User
I have found workaroud:
B4X:
    Dim l_joSheet As JavaObject = l_worksheet
    Dim l_cell As JavaObject = l_joSheet.RunMethod("getCell", Array(9, 15))
    Dim l_sCellContents As String = l_cell.RunMethod("getContents", Null)
    Log($"l_cell.getColumn = ${l_cell.RunMethod("getColumn", Null)}"$)
    Log($"l_cell.getRow = ${l_cell.RunMethod("getRow", Null)}"$)
    Log($"l_sCellContents = ${l_sCellContents}"$)
    Log($"l_cell.getFormula = ${l_cell.RunMethod("getFormula", Null)}"$)
 
Upvote 0
Top