Saturday, June 7, 2008

Defference between Import and ImportSheet

Import method will imports the specified Excel file to the run time datatable.
Ex: Datatable.Import ("C:\sample.xls")

ImportSheet method will imports a specified sheet of a specified file to a specified sheet in the datatable.
Ex: Datatable.ImportSheet "c:\sample.xls", SourceSheetName(or Number), DestinationSheetName(or Number)


If excel file has 7 sheets, if we use import method, then all the 7 Sheets are imported into the runtime datatabe?
The Answer is No. Only the first 2 sheets will be imported into the runtime datatable.
Not all the sheets.
why because, By default datatable will have 2 sheets (Global/Local)
If you add an action in the QTP then only, a new sheet will be added in to the datatable.

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.