QTP: Export a single value to an existing excel sheet (592 Views)
Reply
Occasional Contributor
smithy_2
Posts: 6
Registered: ‎02-24-2010
Message 1 of 2 (592 Views)

QTP: Export a single value to an existing excel sheet

Hello,

I am using an excel datasheet to import variables in my application, which works fine.

What I now want to do is create an extra column in my table called "Passed". Once the details of a particular row have been used and the case has passed, I would like to record a value of Passed in the excel column. The purpose of this is so I never use that data again when I rerun the iteration.

Is there any way for me to export a "passed" status to my existing external excel file? I believe datasheet.export exports the entire sheet but I only want to update one column.

Thanks

S
Please use plain text.
Honored Contributor
Rhonda Robinson
Posts: 3,159
Registered: ‎11-13-2007
Message 2 of 2 (592 Views)

Re: QTP: Export a single value to an existing excel sheet

You are not really wanting to export the data table, just update the current row with a specific value.

Try using Set:

Set (dataTable("Status", dtLocalSheet) = "Passed"
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation