Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

In qtp, how you can use xpath to identify objects?

1127


What are the methods of the TextStream object that are used for reading from a text file?

2334


How can we conduct U-I Testing by using QTP??????

1936


HOw to add the recovery file at runtime to the test file .

2247


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

2164


What is quicktest professional (qtp window?

1077


What is the extension of the qtp local repository?

1146


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

1217


How to data driven test for Win objects in QTP ?

1979


what is the difference between IE & Netscape in web testing on a log in page

2373


how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps

2148


How to find the name of the machine where you are running your automation scripts in qtp?

1040


when will you do debug your script? and explain that process?

1998


why you have standardized functions? plzzz guys with real time exp. do answer

1899


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1973