Find the 'String' from excel sheet and save to another
sheet.But we don't know the string column number and row number?
Answer Posted / kishan
set xlo=createObject("Excel.Application")
xlo.visible=True
set wbo=xlo.Workbooks.open("D:\QTP\TestData\abcdef.xls")
set wso=wbo.worksheets("Sheet1")
rcnt=wso.usedRange.rowcount
ccnt=wso.usedRange.columncount
for i=1 to rcnt
for j=1 to ccnt
str=wso.cells(i,j)
position=instr(1,str,"expected_string")
if position > 1
print "Required String is in
cell"&wso.cells(i,j)
xlo.worksheets("sheet2").cells
(1,1)="expected_string"
end if
next
next
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
What is the difference between the design-time and run-time data tables?
What is throw object?
How to find the name of the machine where you are running your automation scripts in qtp?
How to replay a script in qtp?
What is the use of ordinal identifier in qtp?
Explain about the test fusion report of quicktest professional (qtp)?
what is the difference between development and testing
What is the qtp testing process?
What is debugging? How you debug your script?
What is the recovery scenario in qtp?
what is impact analysis on regression testing?
Where you get the run time data table?