Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whether xlsx extension works while importing data sheet?
#16
Solved: 10 Years, 9 Months ago
(04-14-2011, 01:20 PM)Saket Wrote:
(02-08-2011, 09:25 AM)RGummadidala Wrote: Hi All,

I'm also struggling to import an excel file to Datatable. I have an excel by name Sample.xls and my script is as below

Dim qt
Set qt = createobject("QuickTest.Application")
qt.Launch
qt.Visible=True
DataTable.ImportSheet "C:/Users/Desktop/Sample.xls",1,"Global"

I wrote this in expert view of QTP and ran it. When I run it, I'm seeing the Global sheet of DataTable getting populated (I see the values copied to cell quickly), but at the end of the run, there are no values in the DataTable. I also see 5 iterations of the execution, in the HP results view, where as I ran it only once.

Can somebody throw some light on this ?

Hi,

first of all there is no need to use QTP AOM inside QTP in the expert view. your last statement only should work.Now answer to your question : "at the end of the run, there are no values in the DataTable" - The import you are doing is runtime, so the data which you see will not be visible after the run session. you can see the imported data in the runtime data table. for your second query - as the data is being imported into Global sheet, the test is being iterated to the number of rows in the global sheet. If your test is iterated 5 times then there must be data in 5 rows in the excel you are importing. try importing your data in a new sheet.
hope this solves your query.
@mukesh_shenoy18 - Please open a new thread for your query.

Reply


Messages In This Thread
RE: Importing data sheet format? - by Akhila - 09-30-2008, 06:26 AM
RE: Whether xlsx extension works while importing data sheet? - by AnujN - 05-25-2011, 08:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading data from excel sheet serenediva 1 8,919 03-03-2017, 10:07 AM
Last Post: vinod123
  Chrome Extension UFT Agent for Chrome Browser testing with UFT santhosh kumar 2 12,113 04-20-2016, 01:20 AM
Last Post: santhosh kumar
Question QTP not performing iterations based on local data sheet Breaker 18 55,330 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  How QTP record/play works on google chrome shobi 6 7,153 01-11-2016, 09:53 AM
Last Post: vinod123
  Importing data sheet Santu 2 3,212 08-20-2015, 11:37 PM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 1 Guest(s)