How do u retrieve data from a text file into different
variables. i.e.
in a text file named "source" , the data is like :
india,1000,japan,200,china,50,singapore,45050
this is given in the first line of the text file.
in the second line of the text file the dta is:
sun,moon,planet,river,earth,water
if u use "readline" method by using FSO concept u can
retrieve the entire line in to a variable. but i want to
import each field (ex: "india" in one variable, "1000" in
another variable etc..). Apprecitae proper replies.
Answer Posted / vipin eden ispl
set fso=createobject("scripting.filesystemobject")
set f=opentextfile(path,1)
set a=new regexp
a.pattren="[a-z]+|(\d)+"
a.ignorecase=true
a.global=true
do while f.atendofstream <>true
r=f.readline
set b=a.execute(r)
for each val in b
msgbox val
next
loop
f.close
dz will get u much information later u can modify as per ur
requriment.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we write winrunner language i.e TSL in QTP tool?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
What is the basic concept of quicktest professional (qtp)?
i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?
How you can find the absolute value of the number in qtp?
what is command for executing files?
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version
How to analyzing the checpoint results?
What is the default add-ins in qtp?
when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks
Discuss quicktest professional (qtp) environment?
Your roles and responsibilities and daily tasks? (As automation tester)