Excel automation / errors.- imp pls help

276 views
Skip to first unread message

Mayuri Gupta

unread,
Dec 18, 2012, 10:39:31 PM12/18/12
to qtp-ele...@googlegroups.com
Error 1 :

Dim xlpath , xlsheet

xlpath = "C:\Users\Futura\Documents\HP\QuickTest Professional\Tests\calcnet.xls"
xlsheet= "data"

'add new data table
datatable.AddSheet "DTD"
'import xl into DT
datatable.ImportSheet xlpath, xlsheet, "DTD" ---- on this step QTP gives error " The data Table.ImportSheet operation failed . File contains a feature not supported by Formula One."

Please advise how can i resolve it.

Error 2:
Tried a lot to create excel object
Dim myO , xkpath , xlsheet
xlpath = "C:\Users\Futura\Documents\HP\QuickTest Professional\Tests\calcnet.xls"
xlsheet= "data"
Set myO= createobject("Excel.Application") - Qtp throws error cannot create object .
--
Mayuri Gupta
US - Secaucus


Dineshkumar Rajendran

unread,
Dec 26, 2012, 1:12:07 PM12/26/12
to Mayuri Gupta, QTP eLearn Team
Hi Mayuri,

For Error 1:

Please attach the excel sheet, that would help for debugging.

For Error 2":

Please share the full code.

Thanks,
Dinesh


--
You received this message because you are subscribed to the Google Groups "QTP eLearn Team" group.
To unsubscribe from this group, send email to qtp-elearn-te...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtp-elearn-team?hl=en-US.
 
 

Jitendra.S

unread,
Jan 1, 2013, 10:17:04 PM1/1/13
to qtp-ele...@googlegroups.com
I know it is very silly Question/Suggestion :)
   Make sure that the path lpath = "C:\Users\Futura\Documents\HP\QuickTest Professional\Tests\calcnet.xls" having calcnet file in correct format (XL 2003 format)
and one more thing make sure that "Data" sheet is present in that XL .:)

For Error 2 ..

While running your code make sure that you closed already open XL sheet as well as In task manager
any XL application is not running ..That cause this kind of error ..


~J~
Reply all
Reply to author
Forward
0 new messages