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
What is the use of running the scripts in Hidden-mode in UFT?
wht type of User defined functions or Java Releated functions Do we write in VB scripting
How to find the path of folder in which the test is saved in qtp?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?
What is an optional step in qtp ?
what is the difference between development and testing
How to associate function library at a run time?
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
Hi we are using QTP9.0 for Seibel Application and this seibel application will give you a popup messagebox which is of web , so qtp takes 3 mins to recognize the messagebox and to click on it , we have more number of messageboxes like this . please suggest me some solution
Differentiate the type of test cases which can be automated and which cannot be automated?
Which functionalities of QTP used in banking project?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
What is optional step in qtp? How you can add optional step in qtp?
Explain in brief about the quicktest professional automation object model?