HI Kiran,

You can store the data in array  and run in loop.

 take ubound of array ....so you need not send data for every time........
*

 Regards,

Mohan*
oSheet

On Fri, Jul 15, 2011 at 12:33 AM, Kiran Ogeti <[email protected]> wrote:

>   I am calling a function to add data to excel sheet as below,.. basically
> wanting to add data as passing through arguments..
>
> but since its going to be numerous rows the data gets added..there are two
> problems
>
> 1. Create object and closing object, on every row added
> 2. opening and closing Excel, on every row added
>
> Is there anyway just keep the Excel sheet open and keep adding the rpw
> until its done?.. thanks alot
>
>
> Public function ExportResultstoExcel(datamine,RowStart,ColStart)'
>
>    FilePath ="C:\xxxxxxxx.xlsx"
>    Set xcelObject = createobject("Excel.application")
>    xcelObject.Workbooks.Open(FilePath)
>
>    xcelObject.Worksheets(1).Cells(RowStart,ColStart).value =datamine
>
> xcelObject.ActiveWorkbook.Save
> xcelObject.Workbooks.Close
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en




-- 

kind Regards
Mohan

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to