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
When to use descriptive programming?
How many types of actions are there in quicktest professional (qtp)?
What are the differences between quicktest professional and winrunner?
How many types of recording facility are available in quicktest professional?
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...))
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly
What is the use of ordinal identifier in qtp?
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 :)
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
Discuss quicktest professional environment?
How to check which add-ins are associated with a test in qtp?
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
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
What are the different types of qtp test assets and their extensions?
How many ways is to parameterize the value?