Hi,

I have also come across such scenarios with some of my scripts. Had raised
it with HP too but they could not resolve it. Finally I just copied the
entire script to a new QTP script and it was running fine.

During execution for some reason QTP swaps the variable values of
Exportsheet at run time so you will see the variable values have changed
when the Exportsheet step was executed.

On Thu, Feb 28, 2013 at 8:47 AM, qtptest applications <
[email protected]> wrote:

> HI Gaurav,
>
> While exporting a file QTP throws runtime error - "A general error
> occurred while exporting sheet"
>
> This syntax is *not working*
> Dim res
> Suppose res="qtpResults.xls"
> DataTable.ExportSheet "path\" &res, "ActionName"
> This syntax works in other scripts
> *
> *
> *But this works*
> DataTable.ExportSheet "path\qtpResults.xls", "ActionName" (Instead of
> using a variable I am using the file name.)
>
> I above syntax is not working for that particular script. Any ideas or
> thoughts would be greatly appreciated
>
> Thanks,
> QtpTestApplications
>
>
> On Wed, Feb 27, 2013 at 8:20 PM, gaurav sharma <[email protected]>wrote:
>
>> Hi,
>>
>> Could u please elaborate your query as I am not able to understand it.
>>
>> Regards,
>> Gaurav
>>
>> On Tue, Feb 26, 2013 at 3:17 AM, qtptest applications <
>> [email protected]> wrote:
>>
>>> *A general error occurred while exporting sheet*
>>>
>>>
>>> I used a variable to specify the file name and also specified the name
>>> of local data sheet to be exported
>>>
>>> DataTable.ExportSheet "path\" &resExcel, "Connection"
>>>
>>>
>>>
>>> 1. Value of *resExcel* variable contains alphabets, numbers and "_"
>>>
>>>
>>> 2. I am able to export the file without any errors
>>> a. When I provide the entire path and the file name like
>>> DataTable.ExportSheet "path\resExcelfileName", "ActionName"
>>> or
>>> b. DataTable.ExportSheet "path\" &resExcel, 1
>>>
>>>
>>>
>>> Please let me know what is it that is causing this error and how can
>>> this be corrected without the work around
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> QtpTestApplications
>>>
>>> --
>>> --
>>> 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
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing"
>>> group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> GAURAV SHARMA
>> S/W ENGG.
>> ACCENTURE
>>
>> --
>> --
>> 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
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Regards,


Ganesh Muralidharan
'God Never Forgets'

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to