| || |
unable to take substring value from a table cell
For the below script
rowcount = DataTable.GetSheet("Global").GetRowCount
for rownum = 1 to rowcount
value1 = DataTable.Value ("ITEM", "Global")
value2 = substr(value1,9,12)
The Msgbox value1 is correctly displayed eg "Sunday Holiday"
I am unable to do substr for value1. The error message I get is " Type Mismatch
Re: unable to take substring value from a table cell
The function substr is used in Java and its only referenced through an Object.
For your requirement the function "Mid" will help you ...See the Code below:-
value1 = "Sunday Holiday"
value2 = Mid(value1,9,12)
I hope it helps