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?



Hi I am new to QTP. we are planning to implement automation for the application. I am trying to ..

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

More QTP Interview Questions

what is the difference between quality and testing ?

2 Answers  


Plz explain about Virtual object? What is the situation u r using , explain with example?

1 Answers  


How to find if given number is prime or not

1 Answers  


how will u choose a tool for test automation ?

1 Answers  


How many types of trigger events are there in qtp?

0 Answers  






where do you define the objects as regular expression when u are using regular expressions.

4 Answers  


In QTP, As a first step wht we will do before going to start a Automation....when it will be decided that we have to go for a Automatio..and who will decide to go for Automation. Any body can pls let me know.. Thanks in Advance..

1 Answers   Wipro,


How is GC reddy online program Will i get placed How are the placements.

1 Answers  


How does quicktest professional identifies the object in the application?

0 Answers  


Which function is used to accesses the Properties from Repository Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


What r types of parametarizations?

6 Answers  


what is the difference between call to copy action and call to an existing action

5 Answers  


Categories