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..
Answers were Sorted based on User's Feedback
Answer / king
1st of all the txt file data import into the datatable
using filesystemobject.
After completion of import the data how many rows u want u
can retrive using for loop.
you have any quarries regarding the same plz contact me or
mail me
gi_raju@hotmail.com
9823257761
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
How can i see test results in excel sheet ? test data not present in data table.
How to test login module with different username and password by using data driven testing in QTP?
How to make Non reusable actions into reusable action? is that feature available in QTP
What are the different types of qtp test assets and their extensions?
Explain about datafile/verification of date file when file is not available in local system?
Question:how many types of repositories in QTP9.2?and explain??
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
How u perform exception handling in QTp,what is other name for ths?
The xls contain data. how to get number of columns form the sheet?
How can we do Data driven testing Using For loop in QTP?
What is meant by Step Generator in Qtp How is it used? pls gimme in detail
How many regression test suits in your appliction?