Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the different types of functions available in qtp and explain ?

1057


What is throw object?

2444


How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

2147


Is it possible to change the values of analog recording?

1187


How to use reporter.report event in qtp ?

1089


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1929


What is the Command used to start the QTP

2007


How to use setroproperty?

1081


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

3316


What contains Data Driven Framework document in qtp?

2046


Is it possible to call from one action to another action in qtp?

1072


How to suppress warnings from the test results page?

1094


Can we run test with out adding object in object repository? How it is possible?

1118


How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained, tracked, controlled, and tested?

1219


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

2115