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

1. How to capture data from images in QTP and produce them in Excel sheet ? 2. What is Terminal Emulator add-in installation and configuration procedure ? 3. Tell me how do u define action and transaction in QTP ? 4. Is QTP case sensitive ? 5. Problem with XML checkpoint ? 6. When was QTP 8.2 and Loadrunner 8.0 officially released to the market ? 7. Can we record on netscape browser does it require any special settings ? 8. How do I add new object to the object repository to any particular frame ? 9. Do we have rapid test scrpit wizard in QTP ? How to learn all the windows and objects in QTP 10. How to open Exceel sheet using QTP script ? 11. Is it necessary to learn VB script to work with QTP or we can manage with keword driven ? 12. What is descriptive programming in QTP ? 13. How to invoke the QTP from dos prompt and run a test without any interaction with human ? 14. What is the meaning of Context sensitive ? 15. How to retrive the property values from "Resource.mtr" after recording the script with "Standard checkpoints" ? 16. Where should we use accessbility checkpoints. Can u explain me with the example ? 17. How do we add object repository dynamically ? (During runtime) 18. How to record right click of a context menu and click on the selection ? 19. How to connect oracle database to QTP ? 20. How will you load few objects in Active Screen ? 21. Can I compare two DataBases using QTP ? 22. If the the two object have same class then how QTP will find the object ? 23. Can I change the runtime properties of an object ? How can I check if a parameter exists in database ? 24. What is the script for database check point, bitmapchek point, regular expression ? 25. What is QTP environmental variable ?

1 Answers  


Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"

1 Answers   Cap Gemini,


What are the versions of qtp,What are the differences b/n them?

1 Answers   TCS,


How to delete an object from the object repository?

0 Answers  


what are recovery management techiniques?

2 Answers   BirlaSoft, GL Noble Denton,






What is quicktest professional (qtp window?

0 Answers  


give me the code to save all messages of inbox of gmail into a folder and notepad

0 Answers   Infosys,


Name the different types of recording modes?

0 Answers  


how to tell about testing a website in interview using qtp?? what r the points to be covered mainly?

2 Answers  


how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


IS standard check point is very important than the other check points in QTP? If so why?

4 Answers  


How you can find the absolute value of the number in qtp?

0 Answers  


Categories