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
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps
What is text/text area checkpoint?
How you debug your script?
How would you directly trigger javascript in a test?
How to export quicktest professional results to an .xls file?
What are the types of object repositories? Which one is you are using?
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?
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
Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
How many types of object repository in qtp?
What is the syntax to call one action in another?
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
Explain how you can delete excel file in qtp?