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
What are table and db checkpoints?
What is quick test pro?
What is checkpoints for quicktest professional (qtp)?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?
Explain about the quicktest professional (qtp) automation object model?
how to test load test and block box testing an a web based application pls give ans briefly
Does quicktest professional (qtp) is unicode compatible?
Explain different types of action in qtp?
hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?
hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career
Explain the concept of object repository and how quicktest professional recognises objects?
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
How to use debug tools?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.