2017년 7월 19일 수요일

Search in file or in a list


I have a textfile containing "PhoneMame PhoneNumber,PhoneName2 PhoneNumber2, etc etc"
I want to retrieve Phonename with Phonenumber
What is the best way to do ?

--
if you can put your textfile to the format

"Name","Number"
"Name","Number"
"Name","Number"
"Name","Number"

you can convert it to a list


you'll get a list containing lists (2 Items)  for every Name,Number 

will show you the TelNumber (index2, Name would be index 1)  of the 5th line in your textfile

Then you can search you name with:


index 1 = name index 2 = number
item is the your line in the textfile containing a list of name,number (2 item list)

-- 
Thanks for your help.
I havo formated the input file in my java program with :

name1,phonenumber1
name2,phonenumber2

but, when i execute Set global TelFile to list to csv row list get text (In When File1.GotText)

I have the message The operation list to csv row cannot accept the arguments: [and the list of my entire file]

-- 
this

name1,phonenumber1
name2,phonenumber2

is a table in csv format
to convert it into a list of lists, use the list from csv table block

--
Thanks for your sample, all is workin fine !

-- 

댓글 없음:

댓글 쓰기