how to read multiple values from text file

saeed10051

Active Member
Licensed User
Longtime User
Dear Erel
i am trying to make an application which needs the following data, the data is in a tab delimited text file, i need to pick up this data in an array (or let me know if there is a better option) and use it for further calculation purpose, please let me know if there is a code snippet already available for this type of work. The text file is like this
city longitude time zone
abu dhabi 54 +4
lahore 74 +5
london -.106 0

and so on...
I hope you understand the issue.
 

saeed10051

Active Member
Licensed User
Longtime User
Dear Erel
i have checked the example given over there, the following code populates the list
Dim su As StringUtils
Dim Table As List
Table = su.LoadCSV(File.DirAssets, "1.csv", ",")
but when I want to access the individual enteries in the Table by using Table.get(i) in a for next loop, I get the first line of table with all the enteries.
Please let me know, how can i access individual values in this line? do i need to parse this line, i have read the json parser article also but not sure how to use it here. :confused:
 
Upvote 0

saeed10051

Active Member
Licensed User
Longtime User
here again i will get first line with spaces, the first entery of the Table will look like this
Abu dhabi 54 +4
no commas in between the values,
now how can i pick the city name i.e. abu dhabi in a variable, similarly the other two values i.e. longitude and time zone in two other variables. I need to populate a drop down list with the city names here and use the other two values for calculation purpose.
Sorry for asking so many questions, but i am new to b4A.
 
Upvote 0
Top