07-10-2019 11:22 AM - edited 07-10-2019 11:25 AM
BTW: I would index the 2D a row at a time and use "Search 1D Array" to find your values keeping track of the row you are on you will have the 2D index.
07-10-2019 12:43 PM
Hi RTSLVU,
I guess, unless I am missing something, the main problem is labview 8.0 has two ways to read a file, one is the read from spreadsheet and the other is the read a text file. If I read from a spreadsheet, it doesnt read the column tags/names, just reads the values. Buf If I read from a text file, it treats everything as strings. I cant manipulate the data without converting them. In my program, I can only search for a specfic name and should get the value. So if I have a file like
Country name age favNum
A x 10 7
B y 41 6
I should be able to search for x and age and get 10 in return. But I dont know how to specify what column and row I am looking for.
I hope I made it clear but if you need anything else, please do not hesitate to ask. I know it would be better with a code snippet or pic but like I mentioned, I am still in the designing process, so I dont have either.
Thanks,
Kaawn
07-10-2019 01:04 PM - edited 07-10-2019 01:04 PM
Well you are going to have to work with the data as strings then if you are searching for strings.
Search for your string (x)
That gives you the index of the age data
Index the age string out of the String array and convert it to a numeric if you need a numeric data type
Honestly unless your spreadsheet is going to change why do you need to search at all?
It looks like the age is always the third column...