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 / raju

Set xl = CreateObject("Excel.Application")
set xlwbook = xl.Workbooks.Open(Excel Path)

Set xlWS = xlwbook.Worksheets(1)

Set k = xl.Worksheets(1).UsedRange.Find(Value to
Search)
On error resume next
k=k.value
If err.number>0 Then
msgbox "Pass"
else
Flag=0
If flag=0 Then
Status = "Pass"
StepDesc = "The Work Book has the
values "
Else
Status = "Pass"
StepDesc = "The Work Book Does not
has the values "
End If
End If

Set xlWS = Nothing
set xlwbook = Nothing
Set xl = Nothing

Please let me know if it's not working
raju.ippali@gmail.com

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to evalute defects in QTP script?

1484


How to use reporter.report event in qtp ?

553


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

1330


What are the views available in quicktest professional?

558


tell me abt a time when u had to go above &beyind the call of duty to get the job done

1438






What is the diff between image and bitmap check point?

597


Can I change properties of a test object?

620


explain how to write vb script in qtp?when will you write own script?

1853


There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?

1624


Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

1607


how many maximum number of virtual users we can create?

1566


give me the code to save all messages of inbox of gmail into a folder and notepad

1615


what is keyword driven testing in qtp?n how is it useful?

1490


What test cases can you automate using QTP?

642


What do you to script when objects are removed from application?

610