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 / pushkar1206
This is working code. Don't forget to save workbook else nothing will get saved. Code is:
Set obj=createobject("excel.application")
Set obj2=obj.Workbooks.Open("C:UserspushkarDesktopBook1.xls")
Set obj3=obj2.Worksheets("Sheet1")
Set obj4=obj2.Worksheets("Sheet2")
rw=obj3.usedrange.rows.count
clm=obj3.usedrange.columns.count
For i=1 to rw
For j=1 to clm
a=obj3.cells(i,j).value
If strcomp(a,"nature")=0 Then
obj4.cells(1,2)=a
End If
Next
Next
obj2.Save
obj.Quit
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to test results for qtp ?
What is checkpoints for quicktest professional (qtp)?
How we can use the database checkpoint on a java web based application in which the database connectivity is done using JDBC->Pure Java type (in this type there is no need to create a DSN). At present in QTP we can fetch database values using checkpoint only through DSN. Is there any programming for this if we don't have DSN (ODBC)
Is QTP supports Unix. If yes, then how the test automation is done?
What will be happen if i load object repository at run time, but it has already associated.
What are the two types of repositories available, explain them?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
How to use transactions in qtp?
what type of automation is follwed in the project?
How do you capture tooltip using QTP?
What are the recording modes in qtp?
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
For which type of project the iterative model is suitable?
How to create scenario selector
How to handle the exceptions using recovery secnario manager in quicktest professional?