Hi
I am new to QTP. we are planning to implement automation
for the application.
I am trying to execute the following script:
Set ExcelObj=CreateObject ("Excel.Application")
ExcelObj.WorkBooks.Add
Set NewSheet=ExcelObj.Sheets.Item(1)
NewSheet.Name="Order"
ExcelObj.Cells(1, 1).Value = "Name"
ExcelObj.Cells(1, 2).Value = "Ordernum"
ExcelObj.Cells(2, 1).Value = "nam"
ExcelObj.Cells(2, 2).Value = "21"
ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls"
ExcelObj.Quit
Set ExcelObj = Nothing

in the above script for the line(ExcelObj.Cells(2, 2).Value
= "21")
it is inserting the value 21 successfully.this is fine
But if i want to insert a variable instead of the constant
value then what should be the modification in the script.

For example: If user retrives a value
throug "GetRoProperty" and wants to insert the value into
then how the script changes?

Answer Posted / sri

Hi...don't mind...QTP Questions, u can post in Automation
Tools Section...this Section is only for Manual Testing!!!

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to creating an output value using quicktest professional (qtp)?

562


I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...

1456


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1436


In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.

1521


what is Property......End Property loop? how to write sript for it in QTP

1885






How many ways is to parameterize the value?

615


Sql questions to find second max salary and how to use joins

956


i need to add 1000 users in a domain i written the script for that and it is running successfuly but the problem is that my system is not the user of that domain in which i have to add users so for adding users in that domain i have to install qtp on that another system, can anybody suggest me the way to add those users from my system ultimately i want to know how to access remote computer through script

1411


To which environments does quicktest professional supports?

533


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

692


How can i initiate the objects to find uniquely in OR

1460


What is the parameterization? Give one example?

587


How to analyzing test results using quicktest professional?

561


How many add-ins comes by default with quicktest professional (qtp)?

556


How will you compare keyword and expert view?

520