Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Import data from a ".xls" file to Data table during
Runtime.

Answer Posted / masack

If you want import all the sheets of the workbook during
runtime datatable.

Dim array_shtname()

Set xls = createobject("Excel.Application")
xls.visible = true
Set xlsop = xls.workbooks.open ("excel\path")
shtcount = xlsop.worksheets.count

ReDim preserve array_shtname(shtcount)

For sh = 1 to shtcount
array_shtname(sh-1) = xlsop.worksheets(sh).name
Next
xls.quit

Data_Sheet_Count = datatable.GetSheetCount

For i = 1 to shtcount
Datatable.AddSheet Cstr(array_shtname(i -1))
datatable.ImportSheet "excel\path",i,cint(Data_Sheet_Count)
+i
Next

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When to use descriptive programming?

1112


How many types of actions are there in quicktest professional (qtp)?

960


What are the differences between quicktest professional and winrunner?

1000


How many types of recording facility are available in quicktest professional?

1094


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

2005


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

2125


What is the use of ordinal identifier in qtp?

1010


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

1814


Explain the concept of object repository and how quicktest professional (qtp) recognises objects?

1055


Discuss quicktest professional environment?

1067


How to check which add-ins are associated with a test in qtp?

1091


can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.

6180


Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay

3054


What are the different types of qtp test assets and their extensions?

1160


How many ways is to parameterize the value?

1133