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
How will you check that your test cases covered all the requirements?
How to run a test using quicktest professional?
How many test scenarios you have automated? How many time it will take to execute 30-40 scenarios? What SDLC model you are following? How often you will execute your test scripts? Because of some changes, your test scripts failed? When you will update your test scripts? How much time it will take to update? Do you know how to connect database? Do you know the direct method to count no. of records (or) rows present in record set once query is executed? How will you create the connection string? How did you resolve conflicts present in Object Repository? How good you are in VB? How will you work on Excel Application? How will you select Excel sheet? If you want to select 10 sheets, will you create 10 separate objects? Given string is “abcd”. What are the methods you will use to display “dcba”? Drives script – explain the frameworks? How you are updating results for each test? What is start up, configuration, navigation scripts? If you are not able to understand the application (some module), who will teach you? What test cases to be automated? When to be automated? What is the testing process you are following? What life cycle you are following? When you will use Descriptive Programming? Do you have the permission to add objects into shared object repository? (OR) someone will maintain SOR? Do you know how to add objects into shared object repository? How many test cases you have automated? How much time will it take to execute? What is complex in automation? When you feel automation is complex? Tell me one scenario, the complex functionality you have automated in your project? Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet. Rate yourself in SQL? Display the employee name who is getting maximum salary? sal ID Salary name 001 100 002 500 003 300 ID 001 002 003 Ename A B C Have you written any test cases while you are in Automation? Manual Testing also will you do or you will work only in automation?
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
How to release all resources file from the QTP?
When to use descriptive programming?
How do you configure QTP AND Test director?
What is the basic concept of quicktest professional (qtp)?
If I change the object name in one action will it be updated in all the actions? Or not?
What is the parameterization? Give one example?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)
How many ways we can parameterize data in quicktest professional (qtp)?
Explain measuring transaction.