Micro Focus QTP (UFT) Forums
How to send the Reults to EXLS - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to send the Reults to EXLS (/Thread-How-to-send-the-Reults-to-EXLS)



How to send the Reults to EXLS - Rajashekar Gouda - 03-05-2008

Hi Ankur / Friends,

Can any one pls let me how can we send the result of a test to exl sheet.

In my project i have created a folder with name of Result and in that there is exls with the name of "Result". I want to pass the result of a script from QTP to the exls once after the execution of scripts.

i know "reporter.ReportEvent" this is a commond to send the result to log. but what about to EXLS

Regards
Raj


RE: How to send the Reults to EXLS - Ankur - 03-07-2008

Its the same as writing any data to external data sheet...

You need to use Microsoft Excel Object Model for this

Steps are

1) Create Excel App object CreateObject("Excel.Application")

2) Open the file YourObjectName.Workbooks.Open filepath

3) Select the sheet ExcelObj.Sheets.Item

4) Select the cell where you wish to enter the value
ExcelObj.Sheets.Item.Cells(row,column)

Hope this would help you