JSpreadSheetUtil Methods

JSpreadSheetUtil.java class comes under com.ibaseit.core.util package from ibcore library to evaluate functions

Mock Data to test:

In evaluating data, QATTS gives you various useful and simple functions to evaluate.

method: eval(Map<String, Object> inputData, Map<String, String> inputDataTypes)

inputData:

{ "prodElement19": "=IF(23+0.0825>=prodElement15,prodElement8,23+0.0825)", "prodElement18": "=IF(prodElement4<="Yes",23+0.0825,prodElement8)", "prodElement10": "=DATE(2017,1,12)+1", "prodElement13": "=DATEVALUE("12/12/2017","dd/MM/yyyyy")", "prodElement2": "=prodElement1+" "+prodElement3+" "+prodElement4", "prodElement16": "=prodElement11+1", "prodElement11": "=TODAY()+1", "prodElement14": "=TIMEVALUE("10:10 AM")", "prodElement7": "=MID("Anel Clamp-on O'Connor 150mm - 80 mm", 1,4)", "prodElement6": "=TRIM(" Hello World !")", "prodElement8": "=LOWER(TRIM(" Hello World !")+""+FIND("AJAY KUMAR","K"))", "prodElement9": "=FIND("AJAY KUMAR","K",7)", "prodElement1": "Hello", "prodElement3": "World", "prodElement4": "!", "prodElement5": "=UPPER(LOWER(LOWER(prodElement1)+""+UPPER(prodElement3)+LEN(prodElement3)))", "prodElement15": "=36/6*3+4-8", "prodElement12": "=NOW()+1", "prodElement17": "[ddfd]" }

inputDataTypes:

{ "prodElement9": "string", "prodElement7": "string", "prodElement8": "string", "prodElement5": "string", "prodElement6": "string", "prodElement3": "string", "prodElement4": "string", "prodElement1": "string", "prodElement2": "string", "prodElement11": "date", "prodElement10": "date", "prodElement13": "date", "prodElement12": "date", "prodElement15": "integer", "prodElement14": "date", "prodElement19": "string", "prodElement18": "string" }

Result:

{"prodElement19":"hello world5","prodElement18":23.0825,"prodElement10":1484245800000,"prodElement13":1513017000000,"prodElement2":"Hello World !","prodElement16":1654885800000,"prodElement11":1654799400000,"prodElement14":16800000,"prodElement7":"Anel","prodElement6":"Hello World","prodElement8":"hello world5","prodElement9":-1,"prodElement1":"Hello","prodElement3":"World","prodElement4":"!","prodElement5":"HELLOWORLD5","prodElement15":14.0,"prodElement12":1654841554624,"prodElement17":"[ddfd]"}

Last updated