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

Answer Posted / deeps

Hi,
DataTable.Import("path of the file")

DataTable.ImportSheet("filepath","sheetsource","sheetDest")

Sheetsource:index or name of the sheet in the file which u
want to import. index begins vth 1.

SheetDest: index or name of the sheet in the datatable
which u want to replace vth Sheetsource.Index begins vth 1.

ex:
Datatable.importsheet("c:\name.xls",1,"name")

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1617


what is the diffrence bw qtp architectute and qtp framework?

1744


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.

1754


How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?

3692


Hoe can we do retesting using functions please give the code for it using login page

1745


By using QTP can we record any log files written by the application which is in execution?

1695


Define Canvas view of UFT?

789


How to release all resources file from the QTP?

1252


How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.

2029


what r the main attributes of test automation?

1700


What is the difference in the global and action sheet in qtp?

768


what are the issues we will get when there is migration from QTP 8.2 to QTP 10.0? Is there any problem in executing scripts of 8.2 on 10.0?

1656


What is synchronization point in QTP?

856


What are the check points can be inserted without recording?

808


How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?

3268