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

during Runtime.



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

Answer / sreeprasad

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 ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

How to use Environment parameterization in QTP? Explain with an example.

2 Answers  


How to find the length of the string in qtp?

0 Answers  


how to retreive the xml file data through qtp.can anybody send script for this..

1 Answers   Synechron,


How the exception handling can be done using QTP

6 Answers  


What is difference between the For..Next and While..Wend statements?

2 Answers  






Basically why we need testing?

14 Answers  


what is web application and client server application.is there any difference ?

1 Answers   Wells Fargo,


What criteria do you use when determining when to automate a test or leave it manual?

2 Answers  


How many types of parameters are available in quicktest professional?

0 Answers  


what is the difference between link and hyperlink?

10 Answers   Infosys,


Under what conditions would you recommend QTP for future projects?

1 Answers  


What are the Test design techniques you uses in ur project?

0 Answers   Accenture,


Categories