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 is defenetion of kiran can u tell me plz CVS, SVN

1570


How qtp recognizes the object?

667


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1443


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1355


I got some information from the QTP help.But i am not sure whether through this process will QTP work or not bellow is the Help what I have Remote setup Settings Remote WSH, which is a new technology included in WSH 5.6, provides the ability to run a script on a remote machine or machines. With Remote WSH, the script is physically copied from the local machine to the remote machine before executing. In order to enable Remote WSH functionality, you must first set up the remote machine with the proper security settings. The steps below perform the tasks that enable Remote WSH. Note Both the remote and local machines must be running Windows NT 4 SP3 or greater in order to use Remote WSH. To enable a machine to run remote scripts 1. Install WSH V5.6 on the machine. If you are using Windows 2001 or have installed Internet Explorer 6 or greater, WSH 5.6 has already been installed. Note WSH 5.6 is available for download from the web at http://msdn.microsoft.com/scripting 2. Add yourself to the remote machine's Local Administrators group. 3. To enable Remote WSH, use Poledit.exe on the server. Note An administrator who wants to enable Remote WSH must either acquire the Windows 2000 resource kit, or use http://msdn.microsoft.com/scripting to acquire the necessary windowsscript.adm file that contains the WSH settings. The windowsscript.adm file must be copied to the server that sets the gapplicabel group's policies. Although it is not necessary to copy the file to the server's \WINNT\INF directory, this is nonetheless where the default adm files are located. Note For more information on Poledit.exe, see the Poledit.exe's online help system. 4. WSH should now be enabled on the machine. To test it,. WSH 5.6 can run scripts that reside on remote systems. The following scripts demonstrate this capability. These scripts make the assumption that the files are located on a local machine directory called "c:\wsh5.6"; change the local path and the remote machine name as necessary. After initially running RemoteTest.WSF on the local machine, there may be a small pause as DCOM verifies your identity. After you see the "Done" message, a file named "c:\beenhere.txt" on the remote machine indicates the time that you executed the command (from the remote computer's clock). Script to run scripts remotely set oController = CreateObject("WSHController") set oProcess= oController.CreateScript("c:\wsh5.6\beenhere.wsf","remmachine") oProcess. Execute Could you tell me will it work fine

1794






What is QTP scenario.

1728


how to test use the quality control .how to verify the image verification

2542


how to acess a test in RSA?

1665


What is the difference between the design-time and run-time data tables?

552


iam have done mba(finance)in 2008. in 2008 one reputed consultancy came off campus interview our institution. i got job as "manual test engineer". now iam working as "manual testing engineer". now my problem is when iam going interview the interviewer asking like " ur mba gradute how can u get job in test engineer." this question i have faced every interview. iam explaining how iam getting job. but they are not trust me". pls tell me answer how i am giving relavent ans.. this is my mail id y.ramana84@gmail.com

1398


Explain different recording modes?

579


How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?

542


Where is the Bitmap checkpoint information stored?

1758


Explain about datafile/verification of date file when file is not available in local system?

2220


For which type of project the iterative model is suitable?

1374