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 / bharathchandra maddhi

Option explicit
Dim exo, wbo, wso1, wso2, nor, noc, i, j, x, y
'Open a Excel file
Set exo=CreateObject("excel.application")
exo.Visible=true
Set wbo=exo.Workbooks.Open("C:\Bharath.xls")
Set wso1=wbo.Worksheets("sheet1")
Set wso2=wbo.Worksheets("sheet2")
nor=wso1.usedrange.rows.count
noc=wso1.usedrange.columns.count
'Varifying excel sheet strings
For i=1 to nor step 1
For j=1 to noc step 1
x=wso1.cells(i,j)
x=cstr(x)
If strcomp(x,"Bharath")=0 Then
wso2.cells(1,1)=x
End If
Next
Next
'Close excel s/w and Destroy the objects
exo.Quit
Set wso1=Nothing
Set wso2=Nothing
Set wbo=Nothing
Set exo=Nothing

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

1783


tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?

1541


Explain the parameter in qtp?

594


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

1745


Hybrid framework supports Descriptive programming. Is it true?

664






Explain the Different types of QTP test assets and their extensions?

620


how to find that tools work well with ur existing system?

1374


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1533


Can launch two instances of qtp on the same machine?

591


What is fragmentation and paging?

1606


Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?

1690


Describe function procedure in vbscript.

564


How do you create regression test packs?

624


Difference between test object and run time object?

604


What is the limitation to XML Checkpoints?

1623