Output data to excel with multiple rows
I know how to output data to excel.
But I haven't yet figured out how to output data to excel that uses more than one row.
Let's say I gather data:
A, B, C, D, E
I want to export that data into an excel spreadsheet and have all of those letters under one column.
Now I use the GetROProperty("value") method to acquire these letters, but the Object has the same name but changes slightly.
Here is a snipet of my code:
<font class="small">Code:</font><hr /><pre>
If i => 1 Then
OracleFormWindow("Account alias receipt").OracleTextField("Item_"&i).SetFocus
IT = OracleFormWindow("Account alias receipt").OracleTextField("Item_"&i).GetROProp erty("value")
ITVariable = DataTable.AddSheet ("Results").AddParameter("ISBN", IT)
DataTable.ExportSheet "\\<shared drive>\QTP Scripting Project\Results\" & file_name1 ,"Results"
When the data gets sent to my excel file it has a column header of "ISBN" and wants to populate 5 rows within that column. The way my code is it only populates one row.
I think it keeps overwriting the value of IT until the last value which it keeps.
Any help would be appreciated!
PS I have verified that my code does loop thru fine using all of the input data.
Re: Output data to excel with multiple rows
Look at ValueByRow method in QTP help file