datatable.importsheet importing All rows instead if only data rows

255 views
Skip to first unread message

iRahulSingh

unread,
Dec 9, 2011, 2:49:33 AM12/9/11
to QTP - HP Quick Test Professional - Automated Software Testing
Hi All,

I'm experinecing a tricky situtation where on importing excel file
using datatable.importsheet method, as even empty rows are also
getting imported in datatable. By Blank rows i mean, QTP DataTable on
doing datatable.getrowcount giving me value as 65536 ( that is, total
rows present in a worksheet by default ).

What i'm doing is i'm copying 5-10 rows from one workbook to a new
workbook and importing this new workbook in my datatable and for all
row iteration, qtp is trying to execute for blank rows also.

Does anybody have any clue why this is happening ???


Thanx in Adv.
Cheers
/rahul

Prabhleen Kaur

unread,
Dec 9, 2011, 8:59:51 AM12/9/11
to mercu...@googlegroups.com

click on "run on one iteration only" from run option on qtp.
let me know if that helps.

--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Bhuvan Sundar

unread,
Dec 9, 2011, 9:36:09 AM12/9/11
to mercu...@googlegroups.com
Hi Rahul,
 
try below steps and it works fine.
 
1. first you copy data and paste in Notepad and
2. Again copy the data from Notepad
3. paste in new workbook and save it.

Please let me know if you have issues.
 
Thanks,
Bhuvan
--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Thanks,
Bhuvan
9640391013.

Test Analyst

unread,
Dec 11, 2011, 2:51:05 AM12/11/11
to mercu...@googlegroups.com
Hi raju, May you please share the work book and snapshot of QTP expert view for this particular script.

Archana

unread,
Dec 11, 2011, 8:47:58 AM12/11/11
to mercu...@googlegroups.com
Datatable.ImportSheet is used to import whole sheet. Use Excel
automation object model, (usedrange).

Bhuvan Sundar

unread,
Dec 16, 2011, 7:49:35 AM12/16/11
to mercu...@googlegroups.com
now i am getting this issue. Please share your solution.

Test Analyst

unread,
Dec 17, 2011, 2:52:55 AM12/17/11
to mercu...@googlegroups.com
Dear All, can anybody share workbook + expertview snapshot, so that It can be looked at? I tried to recreate it, but i am getting expected output only.
Reply all
Reply to author
Forward
0 new messages