QTP and Excel Part3 | Quick Test Professional(QTP)
.
QTP Blog RSS

QTP and Excel Part3

The table below list important methods which can be used with DataTable Object while you write scripts using VBScript.

QTP and Excel

Notes:

  • *GetParameterCount is one property people struggle a lot to find. This property simply gives the number of columns in a datatable. I wish the HP QTP developers could change it to GetColumnCount to remove the confusion.
  • 17 and 18 above can be used to retrieve the value at run time and store it temporarily in the run time datatable for later use.
  • The above info should suffice to work on datatable object. if you need more, refer QTP Automation Object Model Reference in the help section.

With this we also finish our series of posts on QTP and Excel. For earlier posts refer QTP and Excel Part1, QTP and Excel Part2.


If you want to keep track of further articles on QTP. I recommend you to subscribe via RSS Feed. You can also subscribe by Email and have new QTP articles sent directly to your inbox.

Also if you wish to ask any questions on above or related to QTP. Please use Testing Tools forum.

4 comments:

qtplearner said...

hi ankur

i have a doubt how i write result using excel file and append the results in ane row
i dont want to use reporterreport event
plz help me out

Ramkumar said...

Hi Ankur,

Before starting my questions, i want to thank and congratulate you for the efforts your taking to share the knowledge.

Here my Question: I am in a Process of creating a frame work. The following are my doubts
1. I have 3 different modules. In Module1, i have created 30 data. I want to use one of the data in Module2. My req is, I want to pass all data created in Module1 to Excel sheet and retrive the value in Module2. How to do that?
2. I want to create my own results file in addition to the existing one. The results file (Excel) contains TestCaseID, Description, Pass/Fail, Comments Columns. After executing each test case, i want to pass these values into excel (say 30 cases means 30 rows in excel) how to achieve this.

Your help is much appreciated.

Thanks a lot.
Ram
(QTP BLOG FAN)

Veena said...

Hi Ankur,

Its great work you are doing here...

One question of Automating Excel as a application. We have an excel sheet which is used to upload data in Oracle. We have to automate the application ie MSEXCEL.
We have been successful in adding data in the sheet but there is a button "upload" which when clicked calls a hidden fucntion which in turn calls a macro. the prblem is that QTP is not recognising this object in Excel...

Right now i have created the script with manual intervention but would like to automate the complete thing if possible.

Any pointers on the same would be helpfull.

Thanks in advance
Veena

Rosy said...

HI Ankur,
Your blogs here really helps.
I have a doubt and need help in figuring out scripting few stuffs using QTP.
1. How can i add conditional format to a excel column data without using object repository.
2. Is there any way we can generate graphs in excel using QTP.

Not sure how to do these.

Thanks & regards,
payal.