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...

hai there..this is chandu..i have a txt file which
containing 1000 lines but at a time i want to retrieve 50
lines..after 50 lines i required to retrieve 51-100..like
that i want...so could anybody help me in this...thanks in
Advance..

Answer Posted / nanda.d reddy

Hi, check the Below function,

Public Function Func_ReadFromNoetpad
(str_filePath,int_frmLine,int_toLine)

Set fso = CreateObject("Scripting.FileSystemObject")
Set Notepad = fso.OpenTextFile(str_filePath,1)

int_Value = 0

Do While Notepad.AtEndOfStream <> True
getLine = Notepad.ReadLine
int_value = int_value+1

If int_Value => int_frmLine and int_Value <=
int_toLine Then
msgbox getLine
End If

Loop

Set Notepad = Nothing

End Function


Here "str_filePath" is location of the text file in
ur local machine, "int_frmLine" is for from which line u
want to get the data and "int_toLine" is for to which line
u want to get the data.

for example If u want to get the data from 20 to 30

Func_ReadFromNoetpad "C:\Documents and
Settings\sdevarapalli\Desktop\sample.txt",20,30

Note: Here i used msgbox to display the data, becoz i don't
the exact scenario what u want. If u send me what u want to
do with that i can update this function.

If any queries or concerns please mail at :

nanda.dreddy@gmail.com

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1928


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

2052


What is text/text area checkpoint?

998


How you debug your script?

1005


How would you directly trigger javascript in a test?

1843


How to export quicktest professional results to an .xls file?

1105


What are the types of object repositories? Which one is you are using?

1117


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

1961


QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue

6130


Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1785


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1794


How many types of object repository in qtp?

1044


What is the syntax to call one action in another?

978


you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

1873


Explain how you can delete excel file in qtp?

1000